JBoss Tools SVN: r18768 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-20 17:16:16 -0500 (Fri, 20 Nov 2009)
New Revision: 18768
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java
Log:
Updated error message in El validator.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java 2009-11-20 19:50:31 UTC (rev 18767)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java 2009-11-20 22:16:16 UTC (rev 18768)
@@ -432,6 +432,9 @@
IFile file = elReference.getResource();
int documnetOffset = elReference.getStartPosition();
String operand = operandToken.getText();
+ if(operand.trim().length()==0) {
+ return;
+ }
String varName = operand;
int offsetOfVarName = documnetOffset + operandToken.getFirstToken().getStart();
int lengthOfVarName = varName.length();
@@ -506,7 +509,7 @@
ELSegment segment = resolution.getUnresolvedSegment();
if(segment==null) {
- JSFModelPlugin.getDefault().logError("No one segments were resolved in EL " + operand + " in " + file);
+ JSFModelPlugin.getDefault().logError("No one segment was found in EL " + operand + " in " + file);
return;
}
LexicalToken token = segment.getToken();
16 years, 1 month
JBoss Tools SVN: r18767 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram: editors and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-11-20 14:50:31 -0500 (Fri, 20 Nov 2009)
New Revision: 18767
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeCollapseAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeExpandAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeHideAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeShowAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleConnectionRouterFanCommand.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleConnectionRouterManhattanCommand.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapecollapse.png
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapeexpand.png
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapehide.png
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapeshow.png
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramContentOutlinePage.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterFanAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterManhattanAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeExpandStateAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeVisibleStateAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/DiagramEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/popup/PopupMenuProvider.java
Log:
https://jira.jboss.org/jira/browse/jbide-5131 - fixed & was a bugfix for popup menu for change router actions
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -39,6 +39,14 @@
public static String OpenSourceAction_canot_find_source_file;
public static String OpenSourceAction_canot_open_source_file;
public static String OpenSourceAction_open_source_file;
+ public static String ShapeCollapseAction_shape_collapse;
+ public static String ShapeCollapseAction_shape_collapse_tooltip;
+ public static String ShapeExpandAction_shape_expand;
+ public static String ShapeExpandAction_shape_expand_tooltip;
+ public static String ShapeHideAction_shape_hide;
+ public static String ShapeHideAction_shape_hide_tooltip;
+ public static String ShapeShowAction_shape_show;
+ public static String ShapeShowAction_shape_show_tooltip;
public static String ToggleShapeExpandStateAction_toggle_expand_state;
public static String ToggleShapeExpandStateAction_toggle_expand_state_tooltip;
public static String ToggleShapeVisibleStateAction_toggle_visible_state;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties 2009-11-20 19:50:31 UTC (rev 18767)
@@ -15,10 +15,18 @@
OpenSourceAction_canot_find_source_file=Can't find source file.
OpenSourceAction_canot_open_source_file=Can't open source file.
OpenSourceAction_open_source_file=Open Source File
-ToggleShapeExpandStateAction_toggle_expand_state=Expand|Collapse
+ShapeCollapseAction_shape_collapse=Collapse shape(s)
+ShapeCollapseAction_shape_collapse_tooltip=Collapse shape(s)
+ShapeExpandAction_shape_expand=Expand shape(s)
+ShapeExpandAction_shape_expand_tooltip=Expand shape(s)
+ShapeHideAction_shape_hide=Hide shape(s)
+ShapeHideAction_shape_hide_tooltip=Hide shape(s)
+ShapeShowAction_shape_show=Show shape(s)
+ShapeShowAction_shape_show_tooltip=Show shape(s)
+ToggleShapeExpandStateAction_toggle_expand_state=Expand|Collapse shape(s)
ToggleShapeExpandStateAction_toggle_expand_state_tooltip=Expand|Collapse (Enter)
-ToggleShapeVisibleStateAction_toggle_visible_state=Toggle visible state
-ToggleShapeVisibleStateAction_toggle_visible_state_tooltip=Toggle visible state (+)
+ToggleShapeVisibleStateAction_toggle_visible_state=Show|Hide shape(s)
+ToggleShapeVisibleStateAction_toggle_visible_state_tooltip=Show|Hide shape(s) (+)
ToggleConnectionsAction_toggle_connections=Show|Hide connections
ShapeSetConstraintCommand_move=move
PartFactory_canot_create_part_for_model_element=Can't create part for model element:
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -35,6 +35,10 @@
import org.jboss.tools.hibernate.ui.diagram.editors.actions.AutoLayoutAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterFanAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterManhattanAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeCollapseAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeExpandAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeHideAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeShowAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleAssociationAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleClassMappingAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleConnectionsAction;
@@ -67,28 +71,56 @@
AutoLayoutAction.img);
addRetargetAction(diagramAction);
//
- DiagramBaseRetargetAction diagramAction1 = new DiagramBaseRetargetAction(
+ DiagramBaseRetargetAction diagramToggleConnectionsAction = new DiagramBaseRetargetAction(
ToggleConnectionsAction.ACTION_ID,
DiagramViewerMessages.ToggleConnectionsAction_toggle_connections,
DiagramViewerMessages.ToggleConnectionsAction_toggle_connections,
ToggleConnectionsAction.img);
- addRetargetAction(diagramAction1);
+ addRetargetAction(diagramToggleConnectionsAction);
//
- DiagramBaseRetargetAction diagramAction2 = new DiagramBaseRetargetAction(
+ DiagramBaseRetargetAction diagramToggleExpandStateAction = new DiagramBaseRetargetAction(
ToggleShapeExpandStateAction.ACTION_ID,
DiagramViewerMessages.ToggleShapeExpandStateAction_toggle_expand_state,
DiagramViewerMessages.ToggleShapeExpandStateAction_toggle_expand_state_tooltip,
ToggleShapeExpandStateAction.img);
- addRetargetAction(diagramAction2);
+ addRetargetAction(diagramToggleExpandStateAction);
//
diagramAction = new DiagramBaseRetargetAction(
+ ShapeExpandAction.ACTION_ID,
+ DiagramViewerMessages.ShapeExpandAction_shape_expand,
+ DiagramViewerMessages.ShapeExpandAction_shape_expand_tooltip,
+ ShapeExpandAction.img);
+ addRetargetAction(diagramAction);
+ //
+ diagramAction = new DiagramBaseRetargetAction(
+ ShapeCollapseAction.ACTION_ID,
+ DiagramViewerMessages.ShapeCollapseAction_shape_collapse,
+ DiagramViewerMessages.ShapeCollapseAction_shape_collapse_tooltip,
+ ShapeCollapseAction.img);
+ addRetargetAction(diagramAction);
+ //
+ DiagramBaseRetargetAction diagramToggleVisibleStateAction = new DiagramBaseRetargetAction(
ToggleShapeVisibleStateAction.ACTION_ID,
DiagramViewerMessages.ToggleShapeVisibleStateAction_toggle_visible_state,
DiagramViewerMessages.ToggleShapeVisibleStateAction_toggle_visible_state_tooltip,
ToggleShapeVisibleStateAction.img);
+ addRetargetAction(diagramToggleVisibleStateAction);
+ //
+ diagramAction = new DiagramBaseRetargetAction(
+ ShapeHideAction.ACTION_ID,
+ DiagramViewerMessages.ShapeHideAction_shape_hide,
+ DiagramViewerMessages.ShapeHideAction_shape_hide_tooltip,
+ ShapeHideAction.img);
addRetargetAction(diagramAction);
//
diagramAction = new DiagramBaseRetargetAction(
+ ShapeShowAction.ACTION_ID,
+ DiagramViewerMessages.ShapeShowAction_shape_show,
+ DiagramViewerMessages.ShapeShowAction_shape_show_tooltip,
+ ShapeShowAction.img);
+ addRetargetAction(diagramAction);
+ //
+ diagramAction = new DiagramBaseRetargetAction(
ToggleClassMappingAction.ACTION_ID,
DiagramViewerMessages.ToggleClassMappingAction_class_mappings,
DiagramViewerMessages.ToggleClassMappingAction_class_mappings,
@@ -138,8 +170,18 @@
act[4] = null;
act[5] = (Action)getAction(ConnectionRouterManhattanAction.ACTION_ID);
act[6] = (Action)getAction(ConnectionRouterFanAction.ACTION_ID);
- diagramAction1.setMenuCreator(new ActionMenu(act));
+ diagramToggleConnectionsAction.setMenuCreator(new ActionMenu(act));
//
+ act = new Action[2];
+ act[0] = (Action)getAction(ShapeExpandAction.ACTION_ID);
+ act[1] = (Action)getAction(ShapeCollapseAction.ACTION_ID);
+ diagramToggleExpandStateAction.setMenuCreator(new ActionMenu(act));
+ //
+ act = new Action[2];
+ act[0] = (Action)getAction(ShapeShowAction.ACTION_ID);
+ act[1] = (Action)getAction(ShapeHideAction.ACTION_ID);
+ diagramToggleVisibleStateAction.setMenuCreator(new ActionMenu(act));
+ //
addRetargetAction(new UndoRetargetAction());
addRetargetAction(new RedoRetargetAction());
addRetargetAction(new ZoomInRetargetAction());
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramContentOutlinePage.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramContentOutlinePage.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramContentOutlinePage.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -19,7 +19,6 @@
import org.eclipse.draw2d.Viewport;
import org.eclipse.draw2d.parts.ScrollableThumbnail;
import org.eclipse.draw2d.parts.Thumbnail;
-import org.eclipse.gef.ContextMenuProvider;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.GraphicalViewer;
import org.eclipse.gef.LayerConstants;
@@ -32,6 +31,7 @@
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.swt.SWT;
@@ -50,7 +50,6 @@
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleShapeVisibleStateAction;
import org.jboss.tools.hibernate.ui.diagram.editors.model.OrmDiagram;
import org.jboss.tools.hibernate.ui.diagram.editors.parts.TreePartFactory;
-import org.jboss.tools.hibernate.ui.diagram.editors.popup.PopupMenuProvider;
/**
*
@@ -179,7 +178,9 @@
protected void configureOutlineViewer() {
getViewer().setEditDomain(editor.getDefaultEditDomain());
getViewer().setEditPartFactory(new TreePartFactory());
- ContextMenuProvider provider = new PopupMenuProvider(getViewer(), getActionRegistry());
+ MenuManager provider = editor.getContextMenu();
+ //MenuManager provider = new PopupMenuProvider(getViewer(), getActionRegistry());
+ //getViewer().setContextMenu(provider);
getViewer().setContextMenu(provider);
getSite().registerContextMenu(
"org.jboss.tools.hibernate.ui.diagram.editors.popup.outline.contextmenu", //$NON-NLS-1$
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -52,6 +52,7 @@
import org.eclipse.gef.ui.rulers.RulerComposite;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.TransferDropTargetListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
@@ -62,19 +63,20 @@
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ActionMenu;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.AutoLayoutAction;
-import org.jboss.tools.hibernate.ui.diagram.editors.actions.CollapseAllAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterFanAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterManhattanAction;
-import org.jboss.tools.hibernate.ui.diagram.editors.actions.ExpandAllAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ExportImageAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.LexicalSortingAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.OpenMappingAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.OpenSourceAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.PrintDiagramViewerAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.RefreshAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeCollapseAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeExpandAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeHideAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeShowAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleAssociationAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleClassMappingAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleConnectionsAction;
@@ -176,6 +178,8 @@
getGraphicalViewer().setProperty(RulerProvider.PROPERTY_RULER_VISIBILITY,
new Boolean(getOrmDiagram().getRulerVisibility()));
loadProperties();
+
+ updateConnectionRouterActions();
}
public GraphicalViewer getEditPartViewer() {
@@ -251,24 +255,42 @@
action = new ConnectionRouterFanAction(this);
registry.registerAction(action);
+ getPropertyActions().add(action.getId());
action = new ConnectionRouterManhattanAction(this);
registry.registerAction(action);
+ getPropertyActions().add(action.getId());
- action = new ToggleShapeExpandStateAction(this);
+ ToggleShapeExpandStateAction actionToggleShapeExpandState = new ToggleShapeExpandStateAction(this);
+ registry.registerAction(actionToggleShapeExpandState);
+ getSelectionActions().add(actionToggleShapeExpandState.getId());
+
+ action = new ShapeExpandAction(this);
registry.registerAction(action);
getSelectionActions().add(action.getId());
-
- action = new ToggleShapeVisibleStateAction(this);
+
+ action = new ShapeCollapseAction(this);
registry.registerAction(action);
getSelectionActions().add(action.getId());
- action = new CollapseAllAction(this);
+ ToggleShapeVisibleStateAction actionToggleShapeVisibleState = new ToggleShapeVisibleStateAction(this);
+ registry.registerAction(actionToggleShapeVisibleState);
+ getSelectionActions().add(actionToggleShapeVisibleState.getId());
+
+ action = new ShapeHideAction(this);
registry.registerAction(action);
-
- action = new ExpandAllAction(this);
+ getSelectionActions().add(action.getId());
+
+ action = new ShapeShowAction(this);
registry.registerAction(action);
+ getSelectionActions().add(action.getId());
+ //action = new CollapseAllAction(this);
+ //registry.registerAction(action);
+
+ //action = new ExpandAllAction(this);
+ //registry.registerAction(action);
+
action = new ZoomInAction(gefRootEditPart.getZoomManager());
registry.registerAction(action);
@@ -277,7 +299,7 @@
action = new LexicalSortingAction(this, null);
registry.registerAction(action);
-
+
Action[] act = new Action[7];
act[0] = (Action)registry.getAction(TogglePropertyMappingAction.ACTION_ID);
act[1] = (Action)registry.getAction(ToggleClassMappingAction.ACTION_ID);
@@ -288,6 +310,15 @@
act[6] = (Action)registry.getAction(ConnectionRouterFanAction.ACTION_ID);
actionToggleConnections.setMenuCreator(new ActionMenu(act));
+ act = new Action[2];
+ act[0] = (Action)registry.getAction(ShapeExpandAction.ACTION_ID);
+ act[1] = (Action)registry.getAction(ShapeCollapseAction.ACTION_ID);
+ actionToggleShapeExpandState.setMenuCreator(new ActionMenu(act));
+
+ act = new Action[2];
+ act[0] = (Action)registry.getAction(ShapeShowAction.ACTION_ID);
+ act[1] = (Action)registry.getAction(ShapeHideAction.ACTION_ID);
+ actionToggleShapeVisibleState.setMenuCreator(new ActionMenu(act));
}
private TransferDropTargetListener createTransferDropTargetListener() {
@@ -635,4 +666,67 @@
}
return null;
}
+
+ public void updateSelectionActions() {
+ updateActions(getSelectionActions());
+ }
+
+ public void updateConnectionRouterActions() {
+ boolean res = isManhattanConnectionRouter();
+ ActionRegistry registry = getActionRegistry();
+ IAction action = registry.getAction(ConnectionRouterManhattanAction.ACTION_ID);
+ action.setChecked(res);
+ action = registry.getAction(ConnectionRouterFanAction.ACTION_ID);
+ action.setChecked(!res);
+ }
+
+ public MenuManager getContextMenu() {
+ final GraphicalViewer viewer = getGraphicalViewer();
+ if (viewer != null) {
+ return viewer.getContextMenu();
+ }
+ return null;
+ }
+
+ public boolean isFanConnectionRouter() {
+ boolean res = false;
+ DiagramEditPart diagramEditPart = getDiagramEditPart();
+ if (diagramEditPart != null) {
+ res = diagramEditPart.isFanConnectionRouter();
+ }
+ return res;
+ }
+
+ public void setFanConnectionRouter(boolean res) {
+ DiagramEditPart diagramEditPart = getDiagramEditPart();
+ if (diagramEditPart != null) {
+ if (res) {
+ diagramEditPart.setupFanConnectionRouter();
+ } else {
+ diagramEditPart.setupManhattanConnectionRouter();
+ }
+ }
+ updateConnectionRouterActions();
+ }
+
+ public boolean isManhattanConnectionRouter() {
+ boolean res = false;
+ DiagramEditPart diagramEditPart = getDiagramEditPart();
+ if (diagramEditPart != null) {
+ res = diagramEditPart.isManhattanConnectionRouter();
+ }
+ return res;
+ }
+
+ public void setManhattanConnectionRouter(boolean res) {
+ DiagramEditPart diagramEditPart = getDiagramEditPart();
+ if (diagramEditPart != null) {
+ if (res) {
+ diagramEditPart.setupManhattanConnectionRouter();
+ } else {
+ diagramEditPart.setupFanConnectionRouter();
+ }
+ }
+ updateConnectionRouterActions();
+ }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterFanAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterFanAction.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterFanAction.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -10,17 +10,20 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.diagram.editors.actions;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
-import org.jboss.tools.hibernate.ui.diagram.editors.parts.DiagramEditPart;
+import org.jboss.tools.hibernate.ui.diagram.editors.command.ToggleConnectionRouterFanCommand;
/**
* Connect figures with direct line connections
*
* @author Vitali Yemialyanchyk
*/
-public class ConnectionRouterFanAction extends DiagramBaseAction {
+public class ConnectionRouterFanAction extends DiagramBaseAction
+{
public static final String ACTION_ID = "connectionRouterFanId"; //$NON-NLS-1$
public static final ImageDescriptor img =
@@ -35,17 +38,15 @@
}
public void run() {
- DiagramEditPart diagramEditPart = getDiagramViewer().getDiagramEditPart();
- if (diagramEditPart != null) {
- diagramEditPart.setupFanConnectionRouter();
- }
+ execute(getCommand());
}
- public boolean isChecked() {
- DiagramEditPart diagramEditPart = getDiagramViewer().getDiagramEditPart();
- if (diagramEditPart != null) {
- return diagramEditPart.isFanConnectionRouter();
+ public Command getCommand() {
+ CompoundCommand cc = new CompoundCommand();
+ boolean checked = editor.isFanConnectionRouter();
+ if (!checked) {
+ cc.add(new ToggleConnectionRouterFanCommand(getDiagramViewer()));
}
- return super.isChecked();
+ return cc;
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterManhattanAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterManhattanAction.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterManhattanAction.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -10,17 +10,20 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.diagram.editors.actions;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
-import org.jboss.tools.hibernate.ui.diagram.editors.parts.DiagramEditPart;
+import org.jboss.tools.hibernate.ui.diagram.editors.command.ToggleConnectionRouterManhattanCommand;
/**
* Connect figures with bend line connections
*
* @author Vitali Yemialyanchyk
*/
-public class ConnectionRouterManhattanAction extends DiagramBaseAction {
+public class ConnectionRouterManhattanAction extends DiagramBaseAction
+{
public static final String ACTION_ID = "connectionRouterManhattanId"; //$NON-NLS-1$
public static final ImageDescriptor img =
@@ -35,17 +38,15 @@
}
public void run() {
- DiagramEditPart diagramEditPart = getDiagramViewer().getDiagramEditPart();
- if (diagramEditPart != null) {
- diagramEditPart.setupManhattanConnectionRouter();
- }
+ execute(getCommand());
}
- public boolean isChecked() {
- DiagramEditPart diagramEditPart = getDiagramViewer().getDiagramEditPart();
- if (diagramEditPart != null) {
- return diagramEditPart.isManhattanConnectionRouter();
+ public Command getCommand() {
+ CompoundCommand cc = new CompoundCommand();
+ boolean checked = editor.isManhattanConnectionRouter();
+ if (!checked) {
+ cc.add(new ToggleConnectionRouterManhattanCommand(getDiagramViewer()));
}
- return super.isChecked();
- }
+ return cc;
+ }
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeCollapseAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeCollapseAction.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeCollapseAction.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram.editors.actions;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.editparts.AbstractTreeEditPart;
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IWorkbenchPart;
+import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
+import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+import org.jboss.tools.hibernate.ui.diagram.editors.command.ToggleShapeExpandStateCommand;
+import org.jboss.tools.hibernate.ui.diagram.editors.model.ExpandableShape;
+import org.jboss.tools.hibernate.ui.diagram.editors.parts.OrmEditPart;
+
+/**
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ShapeCollapseAction extends SelectionAction {
+
+ public static final String ACTION_ID = "shapeCollapseId"; //$NON-NLS-1$
+ public static final ImageDescriptor img =
+ ImageDescriptor.createFromFile(DiagramViewer.class, "icons/shapecollapse.png"); //$NON-NLS-1$
+
+ public ShapeCollapseAction(IWorkbenchPart editor) {
+ super(editor);
+ setId(ACTION_ID);
+ setText(DiagramViewerMessages.ShapeCollapseAction_shape_collapse);
+ setToolTipText(DiagramViewerMessages.ShapeCollapseAction_shape_collapse_tooltip);
+ setImageDescriptor(img);
+ }
+
+ protected DiagramViewer getDiagramViewer() {
+ return (DiagramViewer)getWorkbenchPart();
+ }
+
+ public void run() {
+ execute(getCommand());
+ if (getDiagramViewer() != null) {
+ getDiagramViewer().updateSelectionActions();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Command getCommand() {
+ CompoundCommand cc = new CompoundCommand();
+ if (getSelectedObjects().isEmpty()) {
+ return cc;
+ }
+ List<ExpandableShape> selectedShape = new ArrayList<ExpandableShape>();
+ Iterator it = getSelectedObjects().iterator();
+ while (it.hasNext()) {
+ Object firstElement = it.next();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof ExpandableShape) {
+ ExpandableShape es = (ExpandableShape)obj;
+ if (es.isExpanded()) {
+ selectedShape.add(es);
+ }
+ }
+ }
+ if (selectedShape.size() > 0) {
+ cc.add(new ToggleShapeExpandStateCommand(selectedShape));
+ }
+ return cc;
+ }
+
+ @Override
+ protected boolean calculateEnabled() {
+ return canPerformAction();
+ }
+
+ @SuppressWarnings("unchecked")
+ private boolean canPerformAction() {
+ boolean res = false;
+ if (getSelectedObjects().isEmpty()) {
+ return res;
+ }
+ Iterator it = getSelectedObjects().iterator();
+ while (it.hasNext() && !res) {
+ Object firstElement = it.next();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof ExpandableShape) {
+ ExpandableShape es = (ExpandableShape)obj;
+ if (es.isExpanded()) {
+ res = true;
+ }
+ }
+ }
+ return res;
+ }
+}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeExpandAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeExpandAction.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeExpandAction.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram.editors.actions;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.editparts.AbstractTreeEditPart;
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IWorkbenchPart;
+import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
+import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+import org.jboss.tools.hibernate.ui.diagram.editors.command.ToggleShapeExpandStateCommand;
+import org.jboss.tools.hibernate.ui.diagram.editors.model.ExpandableShape;
+import org.jboss.tools.hibernate.ui.diagram.editors.parts.OrmEditPart;
+
+/**
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ShapeExpandAction extends SelectionAction {
+
+ public static final String ACTION_ID = "shapeExpandId"; //$NON-NLS-1$
+ public static final ImageDescriptor img =
+ ImageDescriptor.createFromFile(DiagramViewer.class, "icons/shapeexpand.png"); //$NON-NLS-1$
+
+ public ShapeExpandAction(IWorkbenchPart editor) {
+ super(editor);
+ setId(ACTION_ID);
+ setText(DiagramViewerMessages.ShapeExpandAction_shape_expand);
+ setToolTipText(DiagramViewerMessages.ShapeExpandAction_shape_expand_tooltip);
+ setImageDescriptor(img);
+ }
+
+ protected DiagramViewer getDiagramViewer() {
+ return (DiagramViewer)getWorkbenchPart();
+ }
+
+ public void run() {
+ execute(getCommand());
+ if (getDiagramViewer() != null) {
+ getDiagramViewer().updateSelectionActions();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Command getCommand() {
+ CompoundCommand cc = new CompoundCommand();
+ if (getSelectedObjects().isEmpty()) {
+ return cc;
+ }
+ List<ExpandableShape> selectedShape = new ArrayList<ExpandableShape>();
+ Iterator it = getSelectedObjects().iterator();
+ while (it.hasNext()) {
+ Object firstElement = it.next();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof ExpandableShape) {
+ ExpandableShape es = (ExpandableShape)obj;
+ if (!es.isExpanded()) {
+ selectedShape.add(es);
+ }
+ }
+ }
+ if (selectedShape.size() > 0) {
+ cc.add(new ToggleShapeExpandStateCommand(selectedShape));
+ }
+ return cc;
+ }
+
+ @Override
+ protected boolean calculateEnabled() {
+ return canPerformAction();
+ }
+
+ @SuppressWarnings("unchecked")
+ private boolean canPerformAction() {
+ boolean res = false;
+ if (getSelectedObjects().isEmpty()) {
+ return res;
+ }
+ Iterator it = getSelectedObjects().iterator();
+ while (it.hasNext() && !res) {
+ Object firstElement = it.next();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof ExpandableShape) {
+ ExpandableShape es = (ExpandableShape)obj;
+ if (!es.isExpanded()) {
+ res = true;
+ }
+ }
+ }
+ return res;
+ }
+}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeHideAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeHideAction.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeHideAction.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram.editors.actions;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.editparts.AbstractTreeEditPart;
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IWorkbenchPart;
+import org.hibernate.mapping.PersistentClass;
+import org.hibernate.mapping.Table;
+import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
+import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+import org.jboss.tools.hibernate.ui.diagram.editors.command.ToggleShapeVisibleStateCommand;
+import org.jboss.tools.hibernate.ui.diagram.editors.model.OrmShape;
+import org.jboss.tools.hibernate.ui.diagram.editors.parts.OrmEditPart;
+
+/**
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ShapeHideAction extends SelectionAction {
+
+ public static final String ACTION_ID = "shapeHideId"; //$NON-NLS-1$
+ public static final ImageDescriptor img =
+ ImageDescriptor.createFromFile(DiagramViewer.class, "icons/shapehide.png"); //$NON-NLS-1$
+
+ public ShapeHideAction(IWorkbenchPart editor) {
+ super(editor);
+ setId(ACTION_ID);
+ setText(DiagramViewerMessages.ShapeHideAction_shape_hide);
+ setToolTipText(DiagramViewerMessages.ShapeHideAction_shape_hide_tooltip);
+ setImageDescriptor(img);
+ }
+
+ protected DiagramViewer getDiagramViewer() {
+ return (DiagramViewer)getWorkbenchPart();
+ }
+
+ public void run() {
+ execute(getCommand());
+ if (getDiagramViewer() != null) {
+ getDiagramViewer().updateSelectionActions();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Command getCommand() {
+ CompoundCommand cc = new CompoundCommand();
+ if (getSelectedObjects().isEmpty()) {
+ return cc;
+ }
+ List<OrmShape> selectedShape = new ArrayList<OrmShape>();
+ Iterator it = getSelectedObjects().iterator();
+ while (it.hasNext()) {
+ Object firstElement = it.next();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof OrmShape) {
+ OrmShape ormShape = (OrmShape)obj;
+ if (ormShape.isVisible()) {
+ selectedShape.add(ormShape);
+ }
+ }
+ }
+ if (selectedShape.size() > 0) {
+ cc.add(new ToggleShapeVisibleStateCommand(selectedShape));
+ }
+ return cc;
+ }
+
+ @Override
+ protected boolean calculateEnabled() {
+ return canPerformAction();
+ }
+
+ @SuppressWarnings("unchecked")
+ private boolean canPerformAction() {
+ boolean res = false;
+ if (getSelectedObjects().isEmpty()) {
+ return res;
+ }
+ Iterator it = getSelectedObjects().iterator();
+ while (it.hasNext() && !res) {
+ Object firstElement = it.next();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof OrmShape) {
+ OrmShape ormShape = (OrmShape)obj;
+ Object ormElement = ormShape.getOrmElement();
+ if (ormElement instanceof PersistentClass || ormElement instanceof Table) {
+ if (ormShape.isVisible()) {
+ res = true;
+ }
+ }
+ }
+ }
+ return res;
+ }
+}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeShowAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeShowAction.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeShowAction.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram.editors.actions;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.editparts.AbstractTreeEditPart;
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IWorkbenchPart;
+import org.hibernate.mapping.PersistentClass;
+import org.hibernate.mapping.Table;
+import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
+import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+import org.jboss.tools.hibernate.ui.diagram.editors.command.ToggleShapeVisibleStateCommand;
+import org.jboss.tools.hibernate.ui.diagram.editors.model.OrmShape;
+import org.jboss.tools.hibernate.ui.diagram.editors.parts.OrmEditPart;
+
+/**
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ShapeShowAction extends SelectionAction {
+
+ public static final String ACTION_ID = "shapeShowId"; //$NON-NLS-1$
+ public static final ImageDescriptor img =
+ ImageDescriptor.createFromFile(DiagramViewer.class, "icons/shapeshow.png"); //$NON-NLS-1$
+
+ public ShapeShowAction(IWorkbenchPart editor) {
+ super(editor);
+ setId(ACTION_ID);
+ setText(DiagramViewerMessages.ShapeShowAction_shape_show);
+ setToolTipText(DiagramViewerMessages.ShapeShowAction_shape_show_tooltip);
+ setImageDescriptor(img);
+ }
+
+ protected DiagramViewer getDiagramViewer() {
+ return (DiagramViewer)getWorkbenchPart();
+ }
+
+ public void run() {
+ execute(getCommand());
+ if (getDiagramViewer() != null) {
+ getDiagramViewer().updateSelectionActions();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Command getCommand() {
+ CompoundCommand cc = new CompoundCommand();
+ if (getSelectedObjects().isEmpty()) {
+ return cc;
+ }
+ List<OrmShape> selectedShape = new ArrayList<OrmShape>();
+ Iterator it = getSelectedObjects().iterator();
+ while (it.hasNext()) {
+ Object firstElement = it.next();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof OrmShape) {
+ OrmShape ormShape = (OrmShape)obj;
+ if (!ormShape.isVisible()) {
+ selectedShape.add(ormShape);
+ }
+ }
+ }
+ if (selectedShape.size() > 0) {
+ cc.add(new ToggleShapeVisibleStateCommand(selectedShape));
+ }
+ return cc;
+ }
+
+ @Override
+ protected boolean calculateEnabled() {
+ return canPerformAction();
+ }
+
+ @SuppressWarnings("unchecked")
+ private boolean canPerformAction() {
+ boolean res = false;
+ if (getSelectedObjects().isEmpty()) {
+ return res;
+ }
+ Iterator it = getSelectedObjects().iterator();
+ while (it.hasNext() && !res) {
+ Object firstElement = it.next();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof OrmShape) {
+ OrmShape ormShape = (OrmShape)obj;
+ Object ormElement = ormShape.getOrmElement();
+ if (ormElement instanceof PersistentClass || ormElement instanceof Table) {
+ if (!ormShape.isVisible()) {
+ res = true;
+ }
+ }
+ }
+ }
+ return res;
+ }
+}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeExpandStateAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeExpandStateAction.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeExpandStateAction.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -44,9 +44,16 @@
setToolTipText(DiagramViewerMessages.ToggleShapeExpandStateAction_toggle_expand_state_tooltip);
setImageDescriptor(img);
}
+
+ protected DiagramViewer getDiagramViewer() {
+ return (DiagramViewer)getWorkbenchPart();
+ }
public void run() {
execute(getCommand());
+ if (getDiagramViewer() != null) {
+ getDiagramViewer().updateSelectionActions();
+ }
}
@SuppressWarnings("unchecked")
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeVisibleStateAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeVisibleStateAction.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeVisibleStateAction.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -46,9 +46,16 @@
setToolTipText(DiagramViewerMessages.ToggleShapeVisibleStateAction_toggle_visible_state_tooltip);
setImageDescriptor(img);
}
+
+ protected DiagramViewer getDiagramViewer() {
+ return (DiagramViewer)getWorkbenchPart();
+ }
public void run() {
execute(getCommand());
+ if (getDiagramViewer() != null) {
+ getDiagramViewer().updateSelectionActions();
+ }
}
@SuppressWarnings("unchecked")
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleConnectionRouterFanCommand.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleConnectionRouterFanCommand.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleConnectionRouterFanCommand.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram.editors.command;
+
+import org.eclipse.gef.commands.Command;
+import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+
+/**
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ToggleConnectionRouterFanCommand extends Command {
+
+ protected boolean stateConnectionRouterFan;
+ protected DiagramViewer diagramViewer;
+
+ public ToggleConnectionRouterFanCommand(DiagramViewer diagramViewer) {
+ this.diagramViewer = diagramViewer;
+ stateConnectionRouterFan = diagramViewer.isFanConnectionRouter();
+ }
+
+ public void execute() {
+ stateConnectionRouterFan = diagramViewer.isFanConnectionRouter();
+ diagramViewer.setFanConnectionRouter(true);
+ }
+
+ public void undo() {
+ diagramViewer.setFanConnectionRouter(stateConnectionRouterFan);
+ }
+
+ public boolean canUndo() {
+ return (diagramViewer != null);
+ }
+}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleConnectionRouterManhattanCommand.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleConnectionRouterManhattanCommand.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleConnectionRouterManhattanCommand.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram.editors.command;
+
+import org.eclipse.gef.commands.Command;
+import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+
+/**
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ToggleConnectionRouterManhattanCommand extends Command {
+
+ protected boolean stateConnectionRouterManhattan;
+ protected DiagramViewer diagramViewer;
+
+ public ToggleConnectionRouterManhattanCommand(DiagramViewer diagramViewer) {
+ this.diagramViewer = diagramViewer;
+ stateConnectionRouterManhattan = diagramViewer.isManhattanConnectionRouter();
+ }
+
+ public void execute() {
+ stateConnectionRouterManhattan = diagramViewer.isManhattanConnectionRouter();
+ diagramViewer.setManhattanConnectionRouter(true);
+ }
+
+ public void undo() {
+ diagramViewer.setManhattanConnectionRouter(stateConnectionRouterManhattan);
+ }
+
+ public boolean canUndo() {
+ return (diagramViewer != null);
+ }
+}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapecollapse.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapecollapse.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapeexpand.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapeexpand.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapehide.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapehide.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapeshow.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/shapeshow.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/DiagramEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/DiagramEditPart.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/DiagramEditPart.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -67,19 +67,15 @@
}
public void setupManhattanConnectionRouter() {
- if (!isManhattanConnectionRouter()) {
- ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
- connLayer.setConnectionRouter(new ManhattanConnectionRouter());
- getOrmDiagram().setupManhattanConnectionRouter();
- }
+ ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
+ connLayer.setConnectionRouter(new ManhattanConnectionRouter());
+ getOrmDiagram().setupManhattanConnectionRouter();
}
public void setupFanConnectionRouter() {
- if (!isFanConnectionRouter()) {
- ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
- connLayer.setConnectionRouter(new FanRouter());
- getOrmDiagram().setupFanConnectionRouter();
- }
+ ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
+ connLayer.setConnectionRouter(new FanRouter());
+ getOrmDiagram().setupFanConnectionRouter();
}
public boolean isManhattanConnectionRouter() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/popup/PopupMenuProvider.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/popup/PopupMenuProvider.java 2009-11-20 18:14:15 UTC (rev 18766)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/popup/PopupMenuProvider.java 2009-11-20 19:50:31 UTC (rev 18767)
@@ -33,8 +33,6 @@
import org.hibernate.mapping.Property;
import org.hibernate.mapping.Table;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.AutoLayoutAction;
-import org.jboss.tools.hibernate.ui.diagram.editors.actions.CollapseAllAction;
-import org.jboss.tools.hibernate.ui.diagram.editors.actions.ExpandAllAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ExportImageAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.OpenMappingAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.OpenSourceAction;
@@ -59,9 +57,10 @@
super(viewer);
this.actionRegistry = actionRegistry;
}
-
+
@SuppressWarnings("unchecked")
public void buildContextMenu(IMenuManager menu) {
+
// Add standard action groups to the menu
GEFActionConstants.addStandardActionGroups(menu);
@@ -139,13 +138,13 @@
appendToGroup(GEFActionConstants.GROUP_VIEW, action);
createMenuItem(getMenu(), action);
- action = getActionRegistry().getAction(CollapseAllAction.ACTION_ID);
- appendToGroup(GEFActionConstants.GROUP_VIEW, action);
- createMenuItem(getMenu(), action);
+ //action = getActionRegistry().getAction(CollapseAllAction.ACTION_ID);
+ //appendToGroup(GEFActionConstants.GROUP_VIEW, action);
+ //createMenuItem(getMenu(), action);
- action = getActionRegistry().getAction(ExpandAllAction.ACTION_ID);
- appendToGroup(GEFActionConstants.GROUP_VIEW, action);
- createMenuItem(getMenu(), action);
+ //action = getActionRegistry().getAction(ExpandAllAction.ACTION_ID);
+ //appendToGroup(GEFActionConstants.GROUP_VIEW, action);
+ //createMenuItem(getMenu(), action);
action = getActionRegistry().getAction(ExportImageAction.ACTION_ID);
appendToGroup(GEFActionConstants.MB_ADDITIONS, action);
@@ -176,7 +175,7 @@
if (hidden) {
return;
}
- MenuItem item = new MenuItem(menu, SWT.CASCADE);
+ MenuItem item = new MenuItem(menu, SWT.CASCADE | SWT.RADIO | SWT.CHECK);
String displayName = action.getText();
item.addSelectionListener(new AL(action));
item.setText(displayName);
16 years, 1 month
JBoss Tools SVN: r18766 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-11-20 13:14:15 -0500 (Fri, 20 Nov 2009)
New Revision: 18766
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4998
Minor fix: comments have been adjusted.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-11-20 18:14:04 UTC (rev 18765)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-11-20 18:14:15 UTC (rev 18766)
@@ -91,18 +91,8 @@
import org.w3c.dom.NodeList;
public class VpeVisualDomBuilder extends VpeDomBuilder {
-
- /**
- *
- */
- private static final String CURSOR_MOVE_STYLE_ID = "vpeCursorMoveStyle";
- /**
- *
- */
- private static final String CURSOR_MOVE_SELECTOR = "*{cursor: move !important}";
- /**
- *
- */
+ private static final String CURSOR_MOVE_STYLE_ID = "vpeCursorMoveStyle"; //$NON-NLS-1$
+ private static final String CURSOR_MOVE_SELECTOR = "*{cursor: move !important}"; //$NON-NLS-1$
public static final String SRC_NODE = "SRC_NODE"; //$NON-NLS-1$
public static final String PARENT = "PARENT"; //$NON-NLS-1$
public static final String VPE_USER_TOGGLE_ID = "vpe-user-toggle-id"; //$NON-NLS-1$
16 years, 1 month
JBoss Tools SVN: r18765 - in trunk/vpe/plugins/org.jboss.tools.vpe: ve and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-11-20 13:14:04 -0500 (Fri, 20 Nov 2009)
New Revision: 18765
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html
Log:
https://jira.jboss.org/jira/browse/JBIDE-4998
Now the move cursor is shown for every draggable element (including splitted h:inputText).
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-11-20 17:45:18 UTC (rev 18764)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-11-20 18:14:04 UTC (rev 18765)
@@ -23,6 +23,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.Path;
@@ -34,7 +35,6 @@
import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.eclipse.wst.xml.core.internal.document.NodeImpl;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
import org.jboss.tools.common.resref.core.ResourceReference;
@@ -63,13 +63,11 @@
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
import org.jboss.tools.vpe.editor.template.dnd.VpeDnd;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionException;
-import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.ElService;
import org.jboss.tools.vpe.editor.util.FaceletUtil;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.TextUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
-import org.jboss.tools.vpe.editor.util.VpeDebugUtil;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.jboss.tools.vpe.editor.util.XmlUtil;
import org.jboss.tools.vpe.resref.core.CSSReferenceList;
@@ -78,6 +76,7 @@
import org.mozilla.interfaces.nsIDOMAttr;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMHTMLDocument;
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
@@ -94,6 +93,14 @@
public class VpeVisualDomBuilder extends VpeDomBuilder {
/**
+ *
+ */
+ private static final String CURSOR_MOVE_STYLE_ID = "vpeCursorMoveStyle";
+ /**
+ *
+ */
+ private static final String CURSOR_MOVE_SELECTOR = "*{cursor: move !important}";
+ /**
*
*/
public static final String SRC_NODE = "SRC_NODE"; //$NON-NLS-1$
@@ -108,7 +115,6 @@
private static final String INCLUDE_ELEMENT_ATTR = "vpe:include-element"; //$NON-NLS-1$
private static final int DRAG_AREA_WIDTH = 10;
private static final int DRAG_AREA_HEIGHT = 10;
- private static final String ATTR_DRAG_AVAILABLE_CLASS = "__drag__available_style"; //$NON-NLS-1$
private static String DOTTED_BORDER = "border: 1px dotted #FF6600; padding: 5px;"; //$NON-NLS-1$
private static final String CSS_STYLE_FOR_BORDER_FOR_UNKNOWN_TAGS = ";border: 1px solid green;"; //$NON-NLS-1$
@@ -2023,33 +2029,43 @@
"read-only"); //$NON-NLS-1$
node.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE, style);
}
+
+ /**
+ * Changes the mouse cursor icon in VPE to 'move'.
+ */
+ private void showMoveCursor(boolean show) {
+ nsIDOMHTMLDocument document = (nsIDOMHTMLDocument) xulRunnerEditor
+ .getDOMDocument()
+ .queryInterface(nsIDOMHTMLDocument.NS_IDOMHTMLDOCUMENT_IID);
+ nsIDOMElement moveStyle = document.getElementById(CURSOR_MOVE_STYLE_ID);
+ // If moveStyle == null then the move cursor icon is shown
+ // otherwise it is not.
+
+ if (show && moveStyle == null) {
+ moveStyle = document.createElement(HTML.TAG_STYLE);
+ moveStyle.setAttribute(HTML.ATTR_ID, CURSOR_MOVE_STYLE_ID);
+ nsIDOMText selector = document.createTextNode(CURSOR_MOVE_SELECTOR);
+ moveStyle.appendChild(selector);
+ document.getBody().appendChild(moveStyle);
+ } else if (!show && moveStyle != null) {
+ moveStyle.getParentNode().removeChild(moveStyle);
+ }
+ }
+
void setMoveCursor(nsIDOMMouseEvent mouseEvent) {
-
nsIDOMElement selectedElement = xulRunnerEditor
.getLastSelectedElement();
- if (selectedElement != null && canInnerDrag(selectedElement)) {
- String styleClasses = selectedElement.getAttribute(HTML.ATTR_CLASS);
- if (inDragArea(getNodeBounds(selectedElement), VisualDomUtil
- .getMousePoint(mouseEvent))) {
- // change cursor
- if (styleClasses == null
- || !(styleClasses.contains(ATTR_DRAG_AVAILABLE_CLASS))) {
- // change cursor style to move
- styleClasses = ATTR_DRAG_AVAILABLE_CLASS + " " //$NON-NLS-1$
- + styleClasses;
- }
- //if mouse in drag area, and left button is pressed than we should
- //start drag session manually.
- } else {
- // change cursor style to normal
- if (styleClasses != null) {
-
- styleClasses = styleClasses.replaceAll(
- ATTR_DRAG_AVAILABLE_CLASS, ""); //$NON-NLS-1$
- }
- }
- selectedElement.setAttribute(HTML.ATTR_CLASS, styleClasses);
+ if (selectedElement != null && canInnerDrag(selectedElement)
+ && inDragArea(getNodeBounds(selectedElement), VisualDomUtil
+ .getMousePoint(mouseEvent))) {
+ // change cursor
+ showMoveCursor(true);
+ //if mouse in drag area, and left button is pressed than we should
+ //start drag session manually.
+ } else {
+ // change cursor style to normal
+ showMoveCursor(false);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html 2009-11-20 17:45:18 UTC (rev 18764)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html 2009-11-20 18:14:04 UTC (rev 18765)
@@ -58,10 +58,6 @@
line-height:1.6;
-moz-user-select: normal;
}
- .__drag__available_style {
-
- cursor: move;
- }
-->
</style>
</head>
16 years, 1 month
JBoss Tools SVN: r18764 - in trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-11-20 12:45:18 -0500 (Fri, 20 Nov 2009)
New Revision: 18764
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2807
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2009-11-20 16:51:07 UTC (rev 18763)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2009-11-20 17:45:18 UTC (rev 18764)
@@ -25,6 +25,7 @@
import org.jboss.tools.seam.ui.test.wizard.OpenSeamComponentDialogTest;
import org.jboss.tools.seam.ui.test.wizard.PackageNamesTest;
import org.jboss.tools.seam.ui.test.wizard.SeamActionNewWizardTest;
+import org.jboss.tools.seam.ui.test.wizard.SeamCreateTestProjectTest;
import org.jboss.tools.seam.ui.test.wizard.SeamFormNewWizardTest;
import org.jboss.tools.seam.ui.test.wizard.SeamProjectNewWizardTest;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -53,6 +54,7 @@
suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamSettingsPreferencesPageTest.class), "org.jboss.tools.seam.ui.test", "projects/TestSeamSettingsPreferencesPage", "TestSeamSettingsPreferencesPage"));
suite.addTestSuite(PackageNamesTest.class);
suite.addTestSuite(JBide3989Test.class);
+ suite.addTestSuite(SeamCreateTestProjectTest.class);
return suite;
}
}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java 2009-11-20 17:45:18 UTC (rev 18764)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.ui.test.wizard;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.jboss.tools.seam.core.test.project.facet.AbstractSeamFacetTest;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
+
+/**
+ * @author daniel
+ *
+ */
+public class SeamCreateTestProjectTest extends AbstractSeamFacetTest {
+ public static final String WAR = "war";
+ public static final String EAR = "ear";
+
+ public SeamCreateTestProjectTest(String name) {
+ super(name);
+ }
+
+ private void checkTestProjectCreation(String name, String seamVersion, String deployType, boolean createTestProject){
+ IDataModel model = createSeamDataModel(deployType);
+
+ // set property to create test project
+ model.setProperty(ISeamFacetDataModelProperties.TEST_PROJECT_CREATING, new Boolean(createTestProject));
+
+ model.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, seamVersion);
+
+ try{
+ final IFacetedProject fproj = createSeamProject(name, model);
+
+ final IProject proj = fproj.getProject();
+
+ assertNotNull(proj);
+ assertTrue(proj.exists());
+ if(createTestProject){
+ assertTrue(proj.getWorkspace().getRoot().getProject(proj.getName() + "-test").exists());
+ IProject testProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-test");
+ this.addResourceToCleanup(testProject);
+ }else{
+ assertFalse(proj.getWorkspace().getRoot().getProject(proj.getName() + "-test").exists());
+ }
+ this.addResourceToCleanup(proj);
+ }catch(CoreException ex){
+ fail(ex.getMessage());
+ }
+ }
+
+ public void testSeam12WarProjectWithTestProject(){
+ checkTestProjectCreation("test_seam12_war_t", SEAM_1_2_0, WAR, true);
+ }
+
+ public void testSeam12WarProjectWithoutTestProject(){
+ checkTestProjectCreation("test_seam12_war", SEAM_1_2_0, WAR, false);
+ }
+
+ public void testSeam20WarProjectWithTestProject(){
+ checkTestProjectCreation("test_seam20_war_t", SEAM_2_0_0, WAR, true);
+ }
+
+ public void testSeam20WarProjectWithoutTestProject(){
+ checkTestProjectCreation("test_seam20_war", SEAM_2_0_0, WAR, false);
+ }
+
+ public void testSeam12EarProjectWithTestProject(){
+ checkTestProjectCreation("test_seam12_ear_t", SEAM_1_2_0, EAR, true);
+ }
+
+ public void testSeam12EarProjectWithoutTestProject(){
+ checkTestProjectCreation("test_seam12_ear", SEAM_1_2_0, EAR, false);
+ }
+
+ public void testSeam20EarProjectWithTestProject(){
+ checkTestProjectCreation("test_seam20_ear_t", SEAM_2_0_0, EAR, true);
+ }
+
+ public void testSeam20EarProjectWithoutTestProject(){
+ checkTestProjectCreation("test_seam20_ear", SEAM_2_0_0, EAR, false);
+ }
+
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 1 month
JBoss Tools SVN: r18763 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-20 11:51:07 -0500 (Fri, 20 Nov 2009)
New Revision: 18763
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java 2009-11-20 16:39:28 UTC (rev 18762)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java 2009-11-20 16:51:07 UTC (rev 18763)
@@ -108,4 +108,33 @@
* @return the set of injection points of the bean
*/
Set<IInjectionPoint> getInjectionPoints();
+
+ /**
+ * Returns the bean which is specialized by this bean. May return null.
+ *
+ * @return the bean which is specialized by this bean.
+ */
+ IBean getSpecializedBean();
+
+ /**
+ * Returns the declaration of @Specializes annotation of this bean. May
+ * return null.
+ *
+ * @return the declaration of @Specializes annotation of this bean.
+ */
+ IAnnotationDeclaration getSpecializesAnnotationDeclaration();
+
+ /**
+ * Returns "true" if this bean specializes another.
+ *
+ * @return "true" if this bean specializes another.
+ */
+ boolean isSpecializing();
+
+ /**
+ * Returns "true" if this bean has @Depended scope.
+ *
+ * @return "true" if this bean has @Depended scope.
+ */
+ boolean isDependent();
}
\ No newline at end of file
16 years, 1 month
JBoss Tools SVN: r18762 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-20 11:39:28 -0500 (Fri, 20 Nov 2009)
New Revision: 18762
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanField.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMember.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducer.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerField.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ISessionBean.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanField.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanField.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+import org.eclipse.jdt.core.IField;
+
+/**
+ * Represents a field which is a member of a bean class.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IBeanField extends IBeanMember {
+
+ /**
+ * Returns the field.
+ *
+ * @return the field.
+ */
+ IField getField();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMember.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMember.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMember.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+import org.jboss.tools.common.java.IJavaSourceReference;
+
+/**
+ * Represents a member of bean class.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IBeanMember extends IJavaSourceReference {
+
+ /**
+ * Returns the class bean that declares this method.
+ *
+ * @return
+ */
+ IClassBean getClassBean();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMember.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.IMethod;
+
+/**
+ * Represents a method declared by a bean class.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IBeanMethod extends IBeanMember {
+
+ /**
+ * Returns the method.
+ *
+ * @return the method.
+ */
+ IMethod getMethod();
+
+ /**
+ * Returns the list of parameters of the method.
+ *
+ * @return
+ */
+ List<IParameter> getParameters();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+import java.util.List;
+
+/**
+ * Represents a class-based bean.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IClassBean extends IBean {
+
+ /**
+ * Returns a list of producers that are declared in this bean class.
+ *
+ * @return a list of producers that are declared in this bean class.
+ */
+ List<IProducer> getProducers();
+
+ /**
+ * Returns a list of disposer methods that are declared in this bean class.
+ *
+ * @return a list of disposer methods that are declared in this bean class.
+ */
+ List<IBeanMethod> getDisposers();
+
+ /**
+ * Returns a list of bean constructor of the bean.
+ *
+ * @return a list of bean constructor of the bean.
+ */
+ List<IBeanMethod> getBeanConstructor();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+import java.util.Set;
+
+import org.eclipse.jdt.core.IType;
+
+/**
+ * Represents a parameter of a method which is a member of bean class.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IParameter extends IBeanMember {
+
+ /**
+ * Returns the all annotations of this parameter.
+ *
+ * @return the all annotations of this parameter.
+ */
+ Set<IAnnotationDeclaration> getAnnotationDeclarations();
+
+ /**
+ * Returns the declared type of this parameter.
+ *
+ * @return the declared type of this parameter.
+ */
+ IType getType();
+
+ /**
+ * Returns the name of this parameter.
+ *
+ * @return the name of this parameter.
+ */
+ String getName();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducer.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducer.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducer.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+/**
+ * Represents a producer.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IProducer extends IBean, IBeanMember {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerField.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerField.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+/**
+ * Represents a producer field.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IProducerField extends IBeanField, IProducer {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+/**
+ * Represents a producer method.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IProducetMethod extends IBeanMethod, IProducer {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ISessionBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ISessionBean.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ISessionBean.java 2009-11-20 16:39:28 UTC (rev 18762)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+import org.eclipse.jdt.core.IAnnotation;
+
+/**
+ * Represents a session bean.
+ *
+ * @author Alexey Kazakov
+ */
+public interface ISessionBean extends IClassBean {
+
+ /**
+ * Returns "true" if this bean is a stateful session bean.
+ *
+ * @return "true" if this bean is a stateful session bean.
+ */
+ boolean isStateful();
+
+ /**
+ * Returns @Statefull annotaion declaration.
+ *
+ * @return @Statefull annotaion declaration.
+ */
+ IAnnotation getStatefulDeclaration();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ISessionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 1 month
JBoss Tools SVN: r18761 - in trunk/seam/plugins: org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-11-20 11:01:38 -0500 (Fri, 20 Nov 2009)
New Revision: 18761
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-2807
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2009-11-20 14:19:51 UTC (rev 18760)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2009-11-20 16:01:38 UTC (rev 18761)
@@ -73,6 +73,12 @@
* web pages backing beans
*/
String ENTITY_BEAN_SOURCE_FOLDER = "model.sources"; //$NON-NLS-1$
+
+ /**
+ * This flag indicates that we should create test project.
+ * Can be "true" or "false".
+ */
+ String TEST_PROJECT_CREATING = "seam.test.project.creating"; //$NON-NLS-1$
/**
* Package name for Entity Beans classes
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2009-11-20 14:19:51 UTC (rev 18760)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2009-11-20 16:01:38 UTC (rev 18761)
@@ -95,7 +95,10 @@
}
@Override
- protected void createTestProject() {
+ protected boolean createTestProject() {
+ if(!(Boolean)model.getProperty(ISeamFacetDataModelProperties.TEST_PROJECT_CREATING))
+ return false;
+
File testProjectDir = new File(seamWebProject.getLocation().removeLastSegments(1).toFile(), testProjectName); //$NON-NLS-1$
testProjectDir.mkdir();
@@ -152,7 +155,7 @@
testTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "test-seam2"); //$NON-NLS-1$
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
- return;
+ return false;
}
AntCopyUtils.FileSet excludeCvsSvn
= new AntCopyUtils.FileSet(SeamFacetAbstractInstallDelegate.CVS_SVN).dir(testTemplateDir);
@@ -226,6 +229,7 @@
}
SeamFacetAbstractInstallDelegate.createComponentsProperties(testSrcDir, "", true); //$NON-NLS-1$
+ return true;
}
@Override
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2009-11-20 14:19:51 UTC (rev 18760)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2009-11-20 16:01:38 UTC (rev 18761)
@@ -846,6 +846,10 @@
if(model.getProperty(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME)==null) {
model.setProperty(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "org.domain." + projectNamePackage + ".entity"); //$NON-NLS-1$ //$NON-NLS-2$
}
+ if(model.getProperty(ISeamFacetDataModelProperties.TEST_PROJECT_CREATING)==null) {
+ model.setProperty(ISeamFacetDataModelProperties.TEST_PROJECT_CREATING, new Boolean(true));
+ }
+
if(model.getProperty(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME)==null) {
model.setProperty(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, "org.domain." + projectNamePackage + ".test"); //$NON-NLS-1$ //$NON-NLS-2$
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2009-11-20 14:19:51 UTC (rev 18760)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2009-11-20 16:01:38 UTC (rev 18761)
@@ -77,6 +77,7 @@
names.add(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME);
names.add(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER);
names.add(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME);
+ names.add(ISeamFacetDataModelProperties.TEST_PROJECT_CREATING);
names.add(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER);
names.add(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME);
names.add(ISeamFacetDataModelProperties.TEST_CREATING);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2009-11-20 14:19:51 UTC (rev 18760)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2009-11-20 16:01:38 UTC (rev 18761)
@@ -215,7 +215,7 @@
* @throws CoreException
*/
public void execute(IProgressMonitor monitor) throws CoreException {
- createTestProject();
+ boolean testProjectCreated = createTestProject();
final String consoleName = SeamFacetAbstractInstallDelegate.isWarConfiguration(model) ? seamWebProject.getName() : ejbProjectName;
if(!SeamFacetAbstractInstallDelegate.isWarConfiguration(model)) {
@@ -282,28 +282,35 @@
WtpUtils.reconfigure(earProjectToBeImported, monitor);
}
- IProject testProjectToBeImported = wsRoot.getProject(testProjectName);
-
- ResourcesUtils.importExistingProject(testProjectToBeImported, wsPath + "/" + testProjectName, testProjectName, monitor, true);
- // Set up compilation level for test project.
- String level = JavaFacetUtils.getCompilerLevel(seamWebProject);
- String testLevel = JavaFacetUtils.getCompilerLevel(testProjectToBeImported);
- if (!testLevel.equals(level)) {
- JavaFacetUtils.setCompilerLevel(testProjectToBeImported, level);
+ IProject testProjectToBeImported = null;
+ if(testProjectCreated){
+ testProjectToBeImported = wsRoot.getProject(testProjectName);
+
+ ResourcesUtils.importExistingProject(testProjectToBeImported, wsPath + "/" + testProjectName, testProjectName, monitor, true);
+ // Set up compilation level for test project.
+ String level = JavaFacetUtils.getCompilerLevel(seamWebProject);
+ String testLevel = JavaFacetUtils.getCompilerLevel(testProjectToBeImported);
+ if (!testLevel.equals(level)) {
+ JavaFacetUtils.setCompilerLevel(testProjectToBeImported, level);
+ }
+ testProjectToBeImported.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ SeamFacetAbstractInstallDelegate.toggleHibernateOnProject(testProjectToBeImported, consoleName);
}
- testProjectToBeImported.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- SeamFacetAbstractInstallDelegate.toggleHibernateOnProject(testProjectToBeImported, consoleName);
createSeamProjectPreferenes();
WtpUtils.reconfigure(seamWebProject, monitor);
- WtpUtils.reconfigure(testProjectToBeImported, monitor);
+ if(testProjectToBeImported != null)
+ WtpUtils.reconfigure(testProjectToBeImported, monitor);
}
/**
* Creates test project for given seam web project.
*/
- protected void createTestProject() {
+ protected boolean createTestProject() {
model.setProperty(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, testProjectName);
+
+ if(!(Boolean)model.getProperty(ISeamFacetDataModelProperties.TEST_PROJECT_CREATING))
+ return false;
File testProjectDir = new File(seamWebProject.getLocation().removeLastSegments(1).toFile(), testProjectName); //$NON-NLS-1$
testProjectDir.mkdir();
@@ -339,7 +346,7 @@
testTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "test"); //$NON-NLS-1$
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
- return;
+ return false;
}
AntCopyUtils.FileSet excludeCvsSvn
= new AntCopyUtils.FileSet(SeamFacetAbstractInstallDelegate.CVS_SVN).dir(testTemplateDir);
@@ -362,18 +369,19 @@
new AntCopyUtils.FileSetFileFilter(includeLibs));
SeamFacetAbstractInstallDelegate.createComponentsProperties(testSrcDir, "", Boolean.TRUE); //$NON-NLS-1$
+ return true;
}
/**
* Creates test project for given seam web project.
* @param testProjectName
*/
- protected void createTestProject(String testProjectName) {
+ protected boolean createTestProject(String testProjectName) {
if(testProjectName==null) {
throw new IllegalArgumentException("Test project name must not be null");
}
this.testProjectName = testProjectName;
- createTestProject();
+ return createTestProject();
}
/**
@@ -484,7 +492,7 @@
IEclipsePreferences prefs = projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
String testSrcPath = seamWebProject.getFullPath().removeLastSegments(1).append(testProjectName).append("test-src").toString();
- prefs.put(ISeamFacetDataModelProperties.TEST_CREATING, "true");
+ prefs.put(ISeamFacetDataModelProperties.TEST_CREATING, ((Boolean)model.getProperty(ISeamFacetDataModelProperties.TEST_PROJECT_CREATING)).toString());
prefs.put(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, testProjectName);
prefs.put(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER, testSrcPath);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2009-11-20 14:19:51 UTC (rev 18760)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2009-11-20 16:01:38 UTC (rev 18761)
@@ -130,6 +130,8 @@
public static String SEAM_INSTALL_WIZARD_PAGE_EDIT;
public static String SEAM_INSTALL_WIZARD_PAGE_ENTITY_BEAN_PACKAGE_NAME;
+
+ public static String SEAM_INSTALL_WIZARD_PAGE_CREATE_TEST_PROJECT;
public static String SEAM_INSTALL_WIZARD_PAGE_GENERAL;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2009-11-20 14:19:51 UTC (rev 18760)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2009-11-20 16:01:38 UTC (rev 18761)
@@ -136,6 +136,12 @@
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_ENTITY_BEAN_PACKAGE_NAME,
"com.mydomain.projectname.entity"); //$NON-NLS-1$
+ private IFieldEditor createTestProjectCheckboxeditor = IFieldEditorFactory.INSTANCE
+ .createCheckboxEditor(
+ ISeamFacetDataModelProperties.TEST_PROJECT_CREATING,
+ SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CREATE_TEST_PROJECT,
+ true);
+
private IFieldEditor testsPkgNameditor = IFieldEditorFactory.INSTANCE
.createTextEditor(
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME,
@@ -409,6 +415,17 @@
generationGroup.setLayout(gridLayout);
registerEditor(sessionBeanPkgNameditor, generationGroup, 3);
registerEditor(entityBeanPkgNameditor, generationGroup, 3);
+
+ registerEditor(createTestProjectCheckboxeditor, generationGroup, 3);
+ createTestProjectCheckboxeditor.addPropertyChangeListener(new PropertyChangeListener(){
+ public void propertyChange(PropertyChangeEvent arg0) {
+ Boolean value = (Boolean)createTestProjectCheckboxeditor.getValue();
+ testsPkgNameditor.setEnabled(value.booleanValue());
+ }
+ });
+
+ createTestProjectCheckboxeditor.setEnabled(isNewProjectWizard());
+
registerEditor(testsPkgNameditor, generationGroup, 3);
setControl(root);
@@ -560,6 +577,9 @@
model.setStringProperty(
ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME,
getEntityPkgName(p));
+ model.setProperty(
+ ISeamFacetDataModelProperties.TEST_PROJECT_CREATING,
+ createTestProjectCheckboxeditor.getValue());
model.setStringProperty(
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME,
getTestPkgName(p));
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2009-11-20 14:19:51 UTC (rev 18760)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2009-11-20 16:01:38 UTC (rev 18761)
@@ -38,6 +38,7 @@
SEAM_RUNTIME_LIST_FIELD_EDITOR_EDITOR_SUPPORTS_ONLY_GRID_LAYOUT=Editor supports only grid layout
SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER=Cannot obtain Seam version number from jboss-seam.jar file.
SEAM_INSTALL_WIZARD_PAGE_SESSION_BEAN_PACKAGE_NAME=Session Bean Package Name:
+SEAM_INSTALL_WIZARD_PAGE_CREATE_TEST_PROJECT=Create Test Project:
SEAM_CONVERSATION_WIZARD_ENTITY_CREATING_OPERATION=Entity creating operation
SEAM_RUNTIME_LIST_FIELD_EDITOR_INPUTELEMENT_MUST_BE_LIST=inputElement must be an instance of List<SeamRuntime>.
SEAM_RUNTIME_LIST_FIELD_EDITOR_NAME_CANNOT_BE_EMPTY=Name cannot be empty
16 years, 1 month
JBoss Tools SVN: r18760 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-20 09:19:51 -0500 (Fri, 20 Nov 2009)
New Revision: 18760
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorContentProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5197
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorContentProvider.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorContentProvider.java 2009-11-20 14:06:26 UTC (rev 18759)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorContentProvider.java 2009-11-20 14:19:51 UTC (rev 18760)
@@ -283,6 +283,7 @@
if(nature == null) {
o.getModel().removeModelTreeListener(syncListener);
viewer.remove(o);
+ if(p!=null && p.exists() && p.getLocation()!=null)
projects.remove(p.getLocation().toString());
} else {
String classname = o.getModel().getMetaData().getMapping("FilteredTrees").getValue(getFilteredTreeName(o.getModel())); //$NON-NLS-1$
16 years, 1 month
JBoss Tools SVN: r18759 - in trunk/struts/plugins/org.jboss.tools.struts: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-11-20 09:06:26 -0500 (Fri, 20 Nov 2009)
New Revision: 18759
Modified:
trunk/struts/plugins/org.jboss.tools.struts/META-INF/MANIFEST.MF
trunk/struts/plugins/org.jboss.tools.struts/build.properties
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsModelPlugin.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/helpers/StrutsProcessHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5236
Modified: trunk/struts/plugins/org.jboss.tools.struts/META-INF/MANIFEST.MF
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/META-INF/MANIFEST.MF 2009-11-20 12:39:10 UTC (rev 18758)
+++ trunk/struts/plugins/org.jboss.tools.struts/META-INF/MANIFEST.MF 2009-11-20 14:06:26 UTC (rev 18759)
@@ -1,5 +1,7 @@
Manifest-Version: 1.0
Bundle-Name: %Bundle-Name.0
+Bundle-ClassPath: struts.jar
+Bundle-ActivationPolicy: lazy
Bundle-Activator: org.jboss.tools.struts.StrutsModelPlugin
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.jboss.tools.struts;singleton:=true
Modified: trunk/struts/plugins/org.jboss.tools.struts/build.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/build.properties 2009-11-20 12:39:10 UTC (rev 18758)
+++ trunk/struts/plugins/org.jboss.tools.struts/build.properties 2009-11-20 14:06:26 UTC (rev 18759)
@@ -1,9 +1,10 @@
-source.. = src/,\
+source.struts.jar = src/,\
resources/
bin.includes = plugin.xml,\
plugin.properties,\
dtds/,\
about.html,\
META-INF/,\
- .
+ .,\
+ struts.jar
additional.bundles = org.eclipse.wst.server.core
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsModelPlugin.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsModelPlugin.java 2009-11-20 12:39:10 UTC (rev 18758)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/StrutsModelPlugin.java 2009-11-20 14:06:26 UTC (rev 18759)
@@ -24,7 +24,7 @@
*/
public class StrutsModelPlugin extends BaseUIPlugin {
public static final String PLUGIN_ID = "org.jboss.tools.struts";
- static StrutsModelPlugin INSTANCE = null;
+ static StrutsModelPlugin INSTANCE;
public StrutsModelPlugin() {
INSTANCE = this;
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/helpers/StrutsProcessHelper.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/helpers/StrutsProcessHelper.java 2009-11-20 12:39:10 UTC (rev 18758)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/helpers/StrutsProcessHelper.java 2009-11-20 14:06:26 UTC (rev 18759)
@@ -585,6 +585,10 @@
continue;
}
String path = bind.getAttributeValue(ATT_PATH);
+ if(path == null) {
+ //this is comment node
+ continue;
+ }
int ind = path.indexOf('?');
if (ind > 0) {
path = path.substring(0, ind);
16 years, 1 month