Author: snjeza
Date: 2008-11-08 19:29:18 -0500 (Sat, 08 Nov 2008)
New Revision: 11619
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/MarkerResolutionGenerator.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/SeamRuntimeMarkerResolution.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
Log:
JBIDE-3075 Adding general quickfixes to the imported project examples
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-11-08 02:44:01 UTC (rev
11618)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-11-09 00:29:18 UTC (rev
11619)
@@ -607,5 +607,11 @@
commandId="org.jboss.tools.seam.ui.refactoring.component"
class="org.jboss.tools.seam.ui.refactoring.SeamComponentRenameHandler"/>
</extension>
+
+ <extension point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.jboss.tools.seam.ui.marker.MarkerResolutionGenerator"
+ markerType="org.jboss.tools.seam.core.seamProjectProblem"/>
+ </extension>
</plugin>
\ No newline at end of file
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/MarkerResolutionGenerator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/MarkerResolutionGenerator.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/MarkerResolutionGenerator.java 2008-11-09
00:29:18 UTC (rev 11619)
@@ -0,0 +1,17 @@
+package org.jboss.tools.seam.ui.marker;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.IMarkerResolutionGenerator2;
+
+public class MarkerResolutionGenerator implements IMarkerResolutionGenerator2 {
+
+ public boolean hasResolutions(IMarker marker) {
+ return true;
+ }
+
+ public IMarkerResolution[] getResolutions(IMarker marker) {
+ return new IMarkerResolution[] { new SeamRuntimeMarkerResolution() };
+ }
+
+}
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/SeamRuntimeMarkerResolution.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/SeamRuntimeMarkerResolution.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/SeamRuntimeMarkerResolution.java 2008-11-09
00:29:18 UTC (rev 11619)
@@ -0,0 +1,38 @@
+package org.jboss.tools.seam.ui.marker;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IMarkerResolution2;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.dialogs.PropertyDialog;
+import org.jboss.tools.seam.ui.preferences.SeamSettingsPreferencePage;
+
+public class SeamRuntimeMarkerResolution implements IMarkerResolution2 {
+
+ public String getDescription() {
+ return "Set Seam properties";
+ }
+
+ public Image getImage() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getLabel() {
+ return "Set Seam properties";
+ }
+
+ public void run(IMarker marker) {
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ IResource resource = marker.getResource();
+ PropertyDialog dialog = PropertyDialog.createDialogOn(shell,
SeamSettingsPreferencePage.ID, resource);
+
+ if (dialog != null) {
+ dialog.open();
+ }
+
+ }
+
+}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-11-08
02:44:01 UTC (rev 11618)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-11-09
00:29:18 UTC (rev 11619)
@@ -78,6 +78,7 @@
*/
public class SeamSettingsPreferencePage extends PropertyPage implements
PropertyChangeListener {
+ public static final String ID =
"org.jboss.tools.seam.ui.propertyPages.SeamSettingsPreferencePage";
private Map<String,IFieldEditor> editorRegistry = new
HashMap<String,IFieldEditor>();
private IProject project;
private IProject warProject;