Package org.eclipse.jdt.ui.text.java
Class ClasspathFixProcessor.ClasspathFixProposal
java.lang.Object
org.eclipse.jdt.ui.text.java.ClasspathFixProcessor.ClasspathFixProposal
- Enclosing class:
ClasspathFixProcessor
A proposal to fix a class path issue.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.eclipse.ltk.core.refactoring.ChangecreateChange(org.eclipse.core.runtime.IProgressMonitor monitor) Returns the change to invoke when the proposal is selected.abstract StringReturns optional additional information about the proposal.abstract StringReturns the string to be displayed in a list of proposals.abstract org.eclipse.swt.graphics.ImagegetImage()Returns the image to be displayed in the list of completion proposals.abstract intReturns the relevance of this completion proposal.static org.eclipse.ltk.core.refactoring.ChangenewAddClasspathChange(IJavaProject project, IClasspathEntry entryToAdd) A helper method to create aChangethat adds an entry to the class path.static org.eclipse.ltk.core.refactoring.ChangenewClasspathChange(IJavaProject project, IClasspathEntry[] newClasspath, org.eclipse.core.runtime.IPath outputLocation) A helper method to create aChangethat modifies a class path.
-
Constructor Details
-
ClasspathFixProposal
public ClasspathFixProposal()
-
-
Method Details
-
newClasspathChange
public static org.eclipse.ltk.core.refactoring.Change newClasspathChange(IJavaProject project, IClasspathEntry[] newClasspath, org.eclipse.core.runtime.IPath outputLocation) A helper method to create aChangethat modifies a class path.- Parameters:
project- the project to changenewClasspath- the new class pathoutputLocation- the new output location- Returns:
- the
Changeto change the class path ornullif the class path is not valid (SeeJavaConventions.validateClasspath(IJavaProject, IClasspathEntry[], IPath)).
-
newAddClasspathChange
public static org.eclipse.ltk.core.refactoring.Change newAddClasspathChange(IJavaProject project, IClasspathEntry entryToAdd) throws JavaModelException A helper method to create aChangethat adds an entry to the class path.- Parameters:
project- the project to changeentryToAdd- the entry to add to the class path- Returns:
- the
Changeto change the class path ornullif the class path is not valid (SeeJavaConventions.validateClasspath(IJavaProject, IClasspathEntry[], IPath)). - Throws:
JavaModelException- thrown if accessing the project failed.
-
createChange
public abstract org.eclipse.ltk.core.refactoring.Change createChange(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException Returns the change to invoke when the proposal is selected.- Parameters:
monitor- the progress monitor- Returns:
- the change
- Throws:
org.eclipse.core.runtime.CoreException- thrown when the creation of the change failed
-
getDisplayString
Returns the string to be displayed in a list of proposals.- Returns:
- the string to be displayed
-
getAdditionalProposalInfo
Returns optional additional information about the proposal. The additional information will be presented to assist the user in deciding if the selected proposal is the desired choice.- Returns:
- the additional information or
null
-
getImage
public abstract org.eclipse.swt.graphics.Image getImage()Returns the image to be displayed in the list of completion proposals. The image would typically be shown to the left of the display string.- Returns:
- the image to be shown or
nullif no image is desired
-
getRelevance
public abstract int getRelevance()Returns the relevance of this completion proposal.The relevance is used to determine if this proposal is more relevant than another proposal.
- Returns:
- the relevance of this completion proposal
-