Author: dazarov
Date: 2010-03-04 06:11:03 -0500 (Thu, 04 Mar 2010)
New Revision: 20641
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4876
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java 2010-03-04
11:00:31 UTC (rev 20640)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java 2010-03-04
11:11:03 UTC (rev 20641)
@@ -16,8 +16,10 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMarkerResolution2;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.DocumentProviderRegistry;
import org.eclipse.ui.texteditor.IDocumentProvider;
@@ -31,7 +33,7 @@
* @author Daniel Azarov
*
*/
-public class AddTLDMarkerResolution implements IMarkerResolution{
+public class AddTLDMarkerResolution implements IMarkerResolution2{
private IFile file;
private Properties properties;
@@ -63,4 +65,12 @@
WebUiPlugin.getPluginLog().logError(ex);
}
}
+
+ public String getDescription() {
+ return Messages.AddTLDMarkerResolution_Name;
+ }
+
+ public Image getImage() {
+ return
ImageDescriptor.createFromFile(AddTLDMarkerResolution.class, "images/xstudio/editors/taglibs_file.gif").createImage();
//$NON-NLS-1$
+ }
}
\ No newline at end of file
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2010-03-04
11:00:31 UTC (rev 20640)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2010-03-04
11:11:03 UTC (rev 20641)
@@ -23,6 +23,7 @@
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator;
+import org.eclipse.ui.IMarkerResolutionGenerator2;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.DocumentProviderRegistry;
import org.eclipse.ui.texteditor.IDocumentProvider;
@@ -37,7 +38,7 @@
* @author Daniel Azarov
*
*/
-public class JSPProblemMarkerResolutionGenerator implements IMarkerResolutionGenerator {
+public class JSPProblemMarkerResolutionGenerator implements IMarkerResolutionGenerator2
{
public static HashMap<String, String> libs = new HashMap<String, String>();
static{
@@ -61,7 +62,6 @@
new AddTLDMarkerResolution(file, properties)
};
}
-
}catch(CoreException ex){
WebUiPlugin.getPluginLog().logError(ex);
}
@@ -142,4 +142,14 @@
return prefix;
}
+
+ public boolean hasResolutions(IMarker marker) {
+ try{
+ if(isOurCase(marker))
+ return true;
+ }catch(CoreException ex){
+ WebUiPlugin.getPluginLog().logError(ex);
+ }
+ return false;
+ }
}
\ No newline at end of file