/** * Apply a modified classpath entry to the classpath. The classpath entry can also be from a classpath container. * @param shell If not null and the entry could not be found on the projects classpath, a dialog will ask to put the entry on the classpath * @param newEntry The modified entry. The entry's kind or path must be unchanged. * @param changedAttributes The attibutes that have changed. See {@link CPListElement} for constants values. * @param jproject Project where the entry belongs to * @param containerPath The path of the entry's parent container or <code>null</code> if the entry is not in a container * @param monitor The progress monitor to use * @throws CoreException */ public static void modifyClasspathEntry(Shell shell, IClasspathEntry newEntry, String[] changedAttributes, IJavaProject jproject, IPath containerPath, IProgressMonitor monitor) throws CoreException { if (containerPath != null) { updateContainerClasspath(jproject, containerPath, newEntry, changedAttributes, monitor); } else { updateProjectClasspath(shell, jproject, newEntry, changedAttributes, monitor); } }
/** * Apply a modified classpath entry to the classpath. The classpath entry can also be from a classpath container. * @param shell If not null and the entry could not be found on the projects classpath, a dialog will ask to put the entry on the classpath * @param newEntry The modified entry. The entry's kind or path must be unchanged. * @param changedAttributes The attributes that have changed. See {@link CPListElement} for constants values. * @param jproject Project where the entry belongs to * @param containerPath The path of the entry's parent container or <code>null</code> if the entry is not in a container * @param isReferencedEntry <code>true</code> iff the entry has a {@link IClasspathEntry#getReferencingEntry() referencing entry} * @param monitor The progress monitor to use * @throws CoreException if the update failed */ public static void modifyClasspathEntry(Shell shell, IClasspathEntry newEntry, String[] changedAttributes, IJavaProject jproject, IPath containerPath, boolean isReferencedEntry, IProgressMonitor monitor) throws CoreException { if (containerPath != null) { updateContainerClasspath(jproject, containerPath, newEntry, changedAttributes, monitor); } else if (isReferencedEntry) { updateReferencedClasspathEntry(jproject, newEntry, changedAttributes, monitor); } else { updateProjectClasspath(shell, jproject, newEntry, changedAttributes, monitor); } }
/** * Apply a modified classpath entry to the classpath. The classpath entry can also be from a classpath container. * @param shell If not null and the entry could not be found on the projects classpath, a dialog will ask to put the entry on the classpath * @param newEntry The modified entry. The entry's kind or path must be unchanged. * @param changedAttributes The attributes that have changed. See {@link CPListElement} for constants values. * @param jproject Project where the entry belongs to * @param containerPath The path of the entry's parent container or <code>null</code> if the entry is not in a container * @param isReferencedEntry <code>true</code> iff the entry has a {@link IClasspathEntry#getReferencingEntry() referencing entry} * @param monitor The progress monitor to use * @throws CoreException if the update failed */ public static void modifyClasspathEntry(Shell shell, IClasspathEntry newEntry, String[] changedAttributes, IJavaProject jproject, IPath containerPath, boolean isReferencedEntry, IProgressMonitor monitor) throws CoreException { if (containerPath != null) { updateContainerClasspath(jproject, containerPath, newEntry, changedAttributes, monitor); } else if (isReferencedEntry) { updateReferencedClasspathEntry(jproject, newEntry, changedAttributes, monitor); } else { updateProjectClasspath(shell, jproject, newEntry, changedAttributes, monitor); } }