JBoss Tools SVN: r11465 - in trunk/common/plugins/org.jboss.tools.common.model: resources/help and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-11-01 09:40:10 -0400 (Sat, 01 Nov 2008)
New Revision: 11465
Added:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-menu.properties
Modified:
trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithChoiceHandler.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithExternalHandler.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/key/WizardKeys.java
Log:
JBIDE-2969
Modified: trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2008-11-01 10:16:02 UTC (rev 11464)
+++ trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2008-11-01 13:40:10 UTC (rev 11465)
@@ -49,6 +49,7 @@
<extension point="org.jboss.tools.common.model.keys">
<keys path="help/keys-model.properties"/>
<keys path="help/keys-model-attrs.properties"/>
+ <keys path="help/keys-model-menu.properties"/>
</extension>
<extension id="modelnature" point="org.eclipse.core.resources.natures">
<runtime>
Added: trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-menu.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-menu.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model-menu.properties 2008-11-01 13:40:10 UTC (rev 11465)
@@ -0,0 +1,60 @@
+CreateActions.menu=New
+CreateFiles.menu=File
+Edit.menu=Edit
+Rename=Rename
+RenameEclipse=Rename
+Copy=Copy
+Cut=Cut
+Paste=Paste
+Delete=Delete
+Move=Move
+Properties=Properties
+Save=Save
+Discard=Discard
+Refresh=Refresh
+Open=Open
+OpenWith=Open With...
+Autolayout=Autolayout
+Help=Help
+
+Model.Run.menu=Run Ant...
+Model.Stop.menu=Stop
+Model.CreateTag.menu=Add Tag...
+Model.CreateAttribute.menu=Add Attribute...
+Model.EditAttribute.menu=Edit Attribute...
+Model.UndoRedo.menu=Undo/Redo
+Model.CreateProperty.menu=Property...
+Model.Mount.menu=Mount
+Model.Unmount.menu=Unmount
+Model.CreateFolder.menu=Folder...
+Model.CreateFile.menu=Any Extension...
+Model.CreateFileXML.menu=XML...
+Model.CreateFilePropertiesV.menu=Properties...
+Model.Import.menu=Import
+Model.CreateFileSystemFolder.menu=Mount Folder...
+Model.CreateFileSystemJar.menu=Mount Jar...
+Model.HiddenSystems.menu=Show/Hide File Systems...
+Model.Refresh.menu=Refresh
+Model.CloseProject.menu=Close Project
+Model.DeleteProject.menu=Delete Project
+Model.RemoveModelNature.menu=Remove Red Hat Capabilities
+Model.SourceActions.menu=Source
+Model.SortMembers.menu=Sort Members
+Model.OrganizeImports.menu=Organize Imports
+Model.ExternalizeStrings.menu=Externalize Strings...
+Model.RefactorActions.menu=Refactor
+Model.ExtractInterface.menu=Extract Interface...
+Model.UseSupertype.menu=Use Supertype Where Possible...
+Model.CreatePageTabHTML.menu=Create Group...
+Model.AddInterface.menu=Add Interface...
+Model.AddClass.menu=Add Class...
+Model.EditInterface.menu=Edit Interface...
+Model.CreateEditor.menu=Add New...
+Model.CreateGroup.menu=Create Group...
+Model.CreateMacro.menu=Create Macro...
+Model.CreateSearchAND.menu=Create Operator AND...
+Model.CreateSearchOR.menu=Create Operator OR...
+Model.CreateSearchValue.menu=Create Value Constraint...
+Model.Execute.menu=Execute Search
+Model.CreateSearchCommand.menu=Create Search Command...
+Model.CreateFileANT.menu=ANT...
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithChoiceHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithChoiceHandler.java 2008-11-01 10:16:02 UTC (rev 11464)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithChoiceHandler.java 2008-11-01 13:40:10 UTC (rev 11465)
@@ -13,6 +13,7 @@
import java.util.*;
import org.jboss.tools.common.meta.action.*;
import org.jboss.tools.common.meta.action.impl.*;
+import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.util.*;
import org.jboss.tools.common.model.filesystems.XFileObject;
@@ -28,7 +29,8 @@
public void executeHandler(XModelObject object, Properties p) throws XModelException {
if(!isEnabled(object)) return;
- if(!OpenWithExternalHandler.checkSave(action.getDisplayName(), object)) return;
+ String displayName = WizardKeys.getMenuItemDisplayName(action, object == null ? null : object.getModelEntity());
+ if(!OpenWithExternalHandler.checkSave(displayName, object)) return;
ServiceDialog d = object.getModel().getService();
String ext = OpenWithHelper.getLogicalExtension(object, action);
XAttributeData a1 = HUtil.find(data, 0, "name");
@@ -54,7 +56,7 @@
}
XModelObject editor = object.getModel().getByPath(OpenWithHelper.EDITORS + "/" + en);
String f = OpenWithHelper.getFileName(object);
- OpenWithExternalHandler.start(action.getDisplayName(), f, editor);
+ OpenWithExternalHandler.start(displayName, f, editor);
}
protected boolean check(XModelObject object) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithExternalHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithExternalHandler.java 2008-11-01 10:16:02 UTC (rev 11464)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithExternalHandler.java 2008-11-01 13:40:10 UTC (rev 11465)
@@ -14,6 +14,7 @@
import java.net.MalformedURLException;
import java.util.*;
import org.jboss.tools.common.meta.action.impl.*;
+import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.*;
@@ -36,12 +37,13 @@
public void executeHandler(XModelObject object, Properties p) throws XModelException {
if(!isEnabled(object)) return;
- if(!checkSave(action.getDisplayName(), object)) return;
+ String displayName = WizardKeys.getMenuItemDisplayName(action, object == null ? null : object.getModelEntity());
+ if(!checkSave(displayName, object)) return;
String f = getFileName(object);
String ext = OpenWithHelper.getLogicalExtension(object, action);
XModelObject editor = OpenWithHelper.getEditorObject(object.getModel(), ext);
if(editor == null) throw new RuntimeException("External editor for file extension '" + ext + "' is not set.");
- start(action.getDisplayName(), f, editor);
+ start(displayName, f, editor);
}
static boolean checkSave(String actionname, XModelObject object) throws XModelException {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/key/WizardKeys.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/key/WizardKeys.java 2008-11-01 10:16:02 UTC (rev 11464)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/key/WizardKeys.java 2008-11-01 13:40:10 UTC (rev 11465)
@@ -13,6 +13,8 @@
import java.util.*;
import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.XModelEntity;
+import org.jboss.tools.common.meta.action.XActionItem;
import org.jboss.tools.common.meta.action.XAttributeData;
public class WizardKeys {
@@ -132,4 +134,32 @@
return sb.toString();
}
+ /**
+ * Display name for menu item generated for meta declaration of action item.
+ * Several keys are checked in resources, the first found key is used.
+ * 1) Entity specific: %Entity name%.%Item name%.menu
+ * 2) Module specific: %Module name%.%Item name%.menu
+ * 3) Global: %Item name%.menu
+ * If no key is found, item.getDisplayName() is returned.
+ *
+ * @param item
+ * @param entity
+ * @return
+ */
+ public static String getMenuItemDisplayName(XActionItem item, XModelEntity entity) {
+ if(entity != null) {
+ String key = entity.getName() + "." + item.getName() + ".menu";
+ String s = keys.getProperty(key);
+ if(s != null) return s;
+ key = entity.getModule() + "." + item.getName() + ".menu";
+ s = keys.getProperty(key);
+ if(s != null) return s;
+ }
+ String key = item.getName() + ".menu";
+ String s = keys.getProperty(key);
+ if(s != null) return s;
+
+ return item.getDisplayName();
+ }
+
}
16 years, 2 months
JBoss Tools SVN: r11464 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-11-01 06:16:02 -0400 (Sat, 01 Nov 2008)
New Revision: 11464
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ConnectionFigure.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3065
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ConnectionFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ConnectionFigure.java 2008-10-31 23:51:44 UTC (rev 11463)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ConnectionFigure.java 2008-11-01 10:16:02 UTC (rev 11464)
@@ -89,6 +89,14 @@
protected void outlineShape(Graphics g) {
g.setLineCap(SWT.CAP_ROUND);
+ Page page=null;
+ if(link != null && link.getFromElement() instanceof Page)
+ page = (Page)link.getFromElement();
+
+ if(page != null && !page.isConfirmed()){
+ g.setLineDash(new int[]{3,3});
+ g.setLineStyle(SWT.LINE_CUSTOM);
+ }
PointList points = getPoints();
Point point = points.getPoint(0);
Point beg = new Point();
16 years, 2 months