JBoss Tools SVN: r38235 - in trunk/documentation/guides/GettingStartedGuide/en-US: images/getting_started and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-01-26 23:04:14 -0500 (Thu, 26 Jan 2012)
New Revision: 38235
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_03.png
Log:
updated for jboss perspective
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2012-01-27 00:08:34 UTC (rev 38234)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2012-01-27 04:04:14 UTC (rev 38235)
@@ -297,6 +297,41 @@
<para>
The JBoss perspective views include: <guilabel>Project Explorer</guilabel>, <guilabel>JBoss Central</guilabel>, <guilabel>Outline</guilabel>, <guilabel>Palette</guilabel>, <guilabel>Properties</guilabel> and <guilabel>Servers</guilabel>.
</para>
+ <para>
+ Certain menus also see a change in available items. These menus include <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem></menuchoice>, <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem></menuchoice> and the context menu for a project.
+ </para>
+ <para>
+ The menu items for <menuchoice>
+ <guimenuitem>File</guimenuitem>
+ <guimenuitem>New</guimenuitem>
+ </menuchoice> can be seen in <xref linkend="figure-jboss_perspective_02" />
+ </para>
+ <figure id="figure-jboss_perspective_02">
+ <title>JBoss Perspective: <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem></menuchoice></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_perspective_02.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The menu items for <menuchoice>
+ <guimenuitem>Window</guimenuitem>
+ <guimenuitem>Show View</guimenuitem>
+ </menuchoice> can be seen in <xref linkend="figure-jboss_perspective_03" />
+ </para>
+ <figure id="figure-jboss_perspective_03">
+ <title>JBoss Perspective: <menuchoice>
+ <guimenuitem>Window</guimenuitem>
+ <guimenuitem>Show View</guimenuitem>
+ </menuchoice>
+ </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_perspective_03.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
</section>
<section id="Support">
<?dbhtml filename="Support.html"?>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_perspective_03.png
===================================================================
(Binary files differ)
12 years, 11 months
JBoss Tools SVN: r38234 - in trunk/common/plugins/org.jboss.tools.common.model: src/org/jboss/tools/common/model/options and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-26 19:08:34 -0500 (Thu, 26 Jan 2012)
New Revision: 38234
Added:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPreferenceInitializer.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Load instance of preference XModel through preference store initialization.
Modified: trunk/common/plugins/org.jboss.tools.common.model/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2012-01-26 23:38:47 UTC (rev 38233)
+++ trunk/common/plugins/org.jboss.tools.common.model/plugin.xml 2012-01-27 00:08:34 UTC (rev 38234)
@@ -406,4 +406,8 @@
</factory>
</extension>
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.jboss.tools.common.model.plugin.ModelPreferenceInitializer"/>
+ </extension>
+
</plugin>
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java 2012-01-26 23:38:47 UTC (rev 38233)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java 2012-01-27 00:08:34 UTC (rev 38234)
@@ -12,6 +12,7 @@
import java.util.Properties;
+import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.model.ServiceDialog;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelConstants;
@@ -25,29 +26,36 @@
public class PreferenceModelUtilities {
static final String ENT_OPTION_ROOT = "OptionRoot"; //$NON-NLS-1$
- private static class PreferenceModelHolder {
- public static XModel preferenceModel;
+ private static XModel preferenceModel;
- static {
- String f = ModelPlugin.getDefault().getStateLocation().toString();
- Properties p = new Properties();
- p.setProperty(XModelConstants.WORKSPACE, f);
- preferenceModel = createPreferenceModel(p);
- ServiceDialog d = createServiceDialog();
- if(d != null) {
- d.setModel(preferenceModel);
- preferenceModel.setService(d);
- }
+ private static ServiceDialog createServiceDialog() {
+ return (ServiceDialog)ModelFeatureFactory.getInstance().createFeatureInstance("org.jboss.tools.common.model.ui.wizards.one.ServiceDialogImpl"); //$NON-NLS-1$
+ }
+
+ public static void initDefaultPreferenceModel() {
+ if(preferenceModel != null) {
+ return;
}
-
- private static ServiceDialog createServiceDialog() {
- return (ServiceDialog)ModelFeatureFactory.getInstance().createFeatureInstance("org.jboss.tools.common.model.ui.wizards.one.ServiceDialogImpl"); //$NON-NLS-1$
+ String f = ModelPlugin.getDefault().getStateLocation().toString();
+ Properties p = new Properties();
+ p.setProperty(XModelConstants.WORKSPACE, f);
+ preferenceModel = createPreferenceModel(p);
+ ServiceDialog d = createServiceDialog();
+ if(d != null) {
+ d.setModel(preferenceModel);
+ preferenceModel.setService(d);
}
-
}
public static XModel getPreferenceModel() {
- return PreferenceModelHolder.preferenceModel;
+ if(preferenceModel == null) {
+ Platform.getBundle(ModelPlugin.PLUGIN_ID);
+ //Kick preference store to make it load.
+ ModelPlugin.getDefault().getPreferenceStore().getDefaultBoolean("preferenceModel"); //$NON-NLS-1$
+ //Just in case
+ initDefaultPreferenceModel();
+ }
+ return preferenceModel;
}
public static XModel createPreferenceModel(Properties p) {
@@ -56,14 +64,11 @@
return XModelFactory.getModel(p);
}
- public static void initPreferenceValue(XModel initialModel, Preference preference)
- throws XModelException {
+ public static void initPreferenceValue(XModel initialModel, Preference preference) throws XModelException {
String value = preference.getValue();
- if (value == null || "".equals(value)) //$NON-NLS-1$
- {
+ if (value == null || value.length() == 0) {
XModelObject object = initialModel.getByPath(preference.getModelPath());
- if (object != null)
- {
+ if (object != null) {
String newValue = object.getAttributeValue(preference.getName());
if (newValue != null && !newValue.equals(value))
preference.setValue(newValue);
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPreferenceInitializer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPreferenceInitializer.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPreferenceInitializer.java 2012-01-27 00:08:34 UTC (rev 38234)
@@ -0,0 +1,19 @@
+package org.jboss.tools.common.model.plugin;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+
+public class ModelPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ ((IScopeContext)DefaultScope.INSTANCE).getNode(ModelPlugin.PLUGIN_ID);
+ PreferenceModelUtilities.initDefaultPreferenceModel();
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPreferenceInitializer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 11 months
JBoss Tools SVN: r38233 - in workspace/bfitzpat/org.jboss.tools.esb.visualizer: src/org/jboss/tools/esb/visualizer and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2012-01-26 18:38:47 -0500 (Thu, 26 Jan 2012)
New Revision: 38233
Modified:
workspace/bfitzpat/org.jboss.tools.esb.visualizer/plugin.xml
workspace/bfitzpat/org.jboss.tools.esb.visualizer/src/org/jboss/tools/esb/visualizer/Activator.java
workspace/bfitzpat/org.jboss.tools.esb.visualizer/src/org/jboss/tools/esb/visualizer/views/ESBVisualizerView.java
Log:
[JBIDE-10726] Some additional cleanup work
Modified: workspace/bfitzpat/org.jboss.tools.esb.visualizer/plugin.xml
===================================================================
--- workspace/bfitzpat/org.jboss.tools.esb.visualizer/plugin.xml 2012-01-26 23:30:15 UTC (rev 38232)
+++ workspace/bfitzpat/org.jboss.tools.esb.visualizer/plugin.xml 2012-01-26 23:38:47 UTC (rev 38233)
@@ -5,16 +5,29 @@
<extension
point="org.eclipse.ui.views">
<category
- name="ESB"
+ name="JBoss ESB"
id="org.jboss.tools.esb.visualizer">
</category>
<view
- name="ESB Configuration Visualizer"
- icon="icons/esb/esb_file.gif"
+ allowMultiple="false"
category="org.jboss.tools.esb.visualizer"
class="org.jboss.tools.esb.visualizer.views.ESBVisualizerView"
- id="org.jboss.tools.esb.visualizer.views.ESBVisualizerView">
+ icon="icons/esb/esb_file.gif"
+ id="org.jboss.tools.esb.visualizer.views.ESBVisualizerView"
+ name="JBoss ESB Configuration Visualizer">
</view>
</extension>
-
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension targetID =
+ "org.eclipse.ui.resourcePerspective">
+ <showInPart id = "org.jboss.tools.esb.visualizer.views.ESBVisualizerView"/>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.jst.j2ee.J2EEPerspective">
+ <showInPart
+ id="org.jboss.tools.esb.visualizer.views.ESBVisualizerView">
+ </showInPart>
+ </perspectiveExtension>
+ </extension>
</plugin>
Modified: workspace/bfitzpat/org.jboss.tools.esb.visualizer/src/org/jboss/tools/esb/visualizer/Activator.java
===================================================================
--- workspace/bfitzpat/org.jboss.tools.esb.visualizer/src/org/jboss/tools/esb/visualizer/Activator.java 2012-01-26 23:30:15 UTC (rev 38232)
+++ workspace/bfitzpat/org.jboss.tools.esb.visualizer/src/org/jboss/tools/esb/visualizer/Activator.java 2012-01-26 23:38:47 UTC (rev 38233)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.esb.visualizer;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -68,4 +69,12 @@
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
+
+ /**
+ * Log a message
+ * @param ex
+ */
+ public static void log(Throwable ex) {
+ plugin.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, "No message", ex));
+ }
}
Modified: workspace/bfitzpat/org.jboss.tools.esb.visualizer/src/org/jboss/tools/esb/visualizer/views/ESBVisualizerView.java
===================================================================
--- workspace/bfitzpat/org.jboss.tools.esb.visualizer/src/org/jboss/tools/esb/visualizer/views/ESBVisualizerView.java 2012-01-26 23:30:15 UTC (rev 38232)
+++ workspace/bfitzpat/org.jboss.tools.esb.visualizer/src/org/jboss/tools/esb/visualizer/views/ESBVisualizerView.java 2012-01-26 23:38:47 UTC (rev 38233)
@@ -37,6 +37,8 @@
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.dialogs.ISelectionValidator;
+import org.eclipse.ui.part.IShowInTarget;
+import org.eclipse.ui.part.ShowInContext;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.zest.core.viewers.AbstractZoomableViewer;
import org.eclipse.zest.core.viewers.GraphViewer;
@@ -64,12 +66,24 @@
* @author bfitzpat
*
*/
-public class ESBVisualizerView extends ViewPart implements IZoomableWorkbenchPart{
+public class ESBVisualizerView extends ViewPart implements IZoomableWorkbenchPart, IShowInTarget {
/**
* The ID of the view as specified by the extension.
*/
- public static final String ID = "org.jboss.tools.esb.visualizer.views.ESBVisualizerView";
+ public static final String ID = "org.jboss.tools.esb.visualizer.views.ESBVisualizerView";//$NON-NLS-1$
+
+ private static final String ACTION_ICON_TAG = "/icons/esb/action.gif";//$NON-NLS-1$
+ private static final String SERVICE_ICON_TAG = "/icons/esb/service.gif";//$NON-NLS-1$
+ private static final String PROVIDER_ICON_TAG = "/icons/esb/provider.gif";//$NON-NLS-1$
+ private static final String BUS_ICON_TAG = "/icons/esb/bus.gif";//$NON-NLS-1$
+ private static final String PROPERTY_ICON_TAG = "/icons/esb/property.gif";//$NON-NLS-1$
+ private static final String LISTENER_ICON_TAG = "/icons/esb/listener.gif";//$NON-NLS-1$
+ private static final String ESB_FILE_ICON_TAG = "/icons/esb/esb_file.gif";//$NON-NLS-1$
+ private static final String REFRESH_ICON_TAG = "/icons/refresh.gif";//$NON-NLS-1$
+ private static final String HORIZONTAL_TREE_LAYOUT_ICON_TAG = "/icons/horizontalTreeLayout.gif";//$NON-NLS-1$
+ private static final String VERTICAL_TREE_LAYOUT_ICON_TAG = "/icons/verticalTreeLayout.gif";//$NON-NLS-1$
+ private static final String RADIAL_LAYOUT_ICON_TAG = "/icons/radialLayout.gif";//$NON-NLS-1$
private GraphViewer gv;
@@ -97,7 +111,10 @@
String path = selectedFile.getLocation().toOSString();
ESBDomParser parser = new ESBDomParser();
if (parser.isFileESBConfig(path)) {
- visualizeESB(path);
+ if (!gv.getGraphControl().isDisposed()) {
+ visualizeESB(path);
+ refreshLayoutAction.run();
+ }
}
}
}
@@ -123,7 +140,8 @@
makeActions();
hookContextMenu();
fillToolBar();
- visualizeESB(null);
+// visualizeESB(null);
+ setEmptyGraph();
horizontalLayoutAction.setChecked(true);
horizontalLayoutAction.run();
getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(listener);
@@ -143,17 +161,28 @@
}
}
- /*
+ private void setEmptyGraph() {
+ clearGraph();
+ new GraphNode (gv.getGraphControl(), ZestStyles.NODES_CACHE_LABEL,
+ "Select an ESB Configuration file in the navigator\n" +
+ "or use the 'Open JBoss ESB Configuration' view menu\n" +
+ "to show a configuration graphically.");
+ refreshLayoutAction.run();
+ }
+
+ /**
* Import the esb XML file and render nodes and connections
* @param filepath
*/
- private void visualizeESB ( String filepath ) {
+ public void visualizeESB ( String filepath ) {
ESBDomParser parser = new ESBDomParser();
parser.parseXmlFile(filepath);
clearGraph();
TreeParent root = parser.getRoot();
root.setEsbObjectType(ESBType.ESB);
- GraphNode rootnode = new GraphNode(gv.getGraphControl(), ZestStyles.NODES_CACHE_LABEL, root.getName());
+ GraphNode rootnode = new GraphNode(gv.getGraphControl(),
+ ZestStyles.NODES_CACHE_LABEL,
+ root.getName());
rootnode.setImage(getImageFromPlugin("/icons/esb/esb_file.gif"));
this.defaultBorder = rootnode.getBorderColor();
rootnode.setData(root);
@@ -197,25 +226,25 @@
if (tp.getEsbObjectType() != null) {
switch (tp.getEsbObjectType()) {
case ACTION:
- p.setImage(getImageFromPlugin("/icons/esb/action.gif"));
+ p.setImage(getImageFromPlugin(ACTION_ICON_TAG));
break;
case SERVICE:
- p.setImage(getImageFromPlugin("/icons/esb/service.gif"));
+ p.setImage(getImageFromPlugin(SERVICE_ICON_TAG));
break;
case PROVIDER:
- p.setImage(getImageFromPlugin("/icons/esb/provider.gif"));
+ p.setImage(getImageFromPlugin(PROVIDER_ICON_TAG));
break;
case BUS:
- p.setImage(getImageFromPlugin("/icons/esb/bus.gif"));
+ p.setImage(getImageFromPlugin(BUS_ICON_TAG));
break;
case PROPERTY:
- p.setImage(getImageFromPlugin("/icons/esb/property.gif"));
+ p.setImage(getImageFromPlugin(PROPERTY_ICON_TAG));
break;
case LISTENER:
- p.setImage(getImageFromPlugin("/icons/esb/listener.gif"));
+ p.setImage(getImageFromPlugin(LISTENER_ICON_TAG));
break;
case ESB:
- p.setImage(getImageFromPlugin("/icons/esb/esb_file.gif"));
+ p.setImage(getImageFromPlugin(ESB_FILE_ICON_TAG));
break;
default:
break;
@@ -287,7 +316,7 @@
* Fill the view menu
*/
private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu");
+ MenuManager menuMgr = new MenuManager("#PopupMenu");//$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
@@ -325,7 +354,7 @@
refreshLayoutAction.setText("Refresh Layout");
refreshLayoutAction.setToolTipText("Refresh Layout");
- refreshLayoutAction.setImageDescriptor(Activator.getImageDescriptor("/icons/refresh.gif"));
+ refreshLayoutAction.setImageDescriptor(Activator.getImageDescriptor(REFRESH_ICON_TAG));
openESBFileAction = new Action() {
public void run() {
@@ -334,9 +363,9 @@
ESBVisualizerView.this.getSite().getShell().getShell(),
null,
"Select ESB file:",
- ".xml");
+ ".xml");//$NON-NLS-1$
dialog.setTitle("Open ESB Configuration");
- dialog.setImage(getImageFromPlugin("/icons/esb/esb_file.gif"));
+ dialog.setImage(getImageFromPlugin(ESB_FILE_ICON_TAG));
dialog.setValidator(new ISelectionValidator() {
@Override
@@ -368,7 +397,7 @@
};
openESBFileAction.setText("Open ESB Configuration");
openESBFileAction.setToolTipText("Open ESB Configuration");
- openESBFileAction.setImageDescriptor(Activator.getImageDescriptor("/icons/esb/new_esb_file.gif"));
+ openESBFileAction.setImageDescriptor(Activator.getImageDescriptor(ESB_FILE_ICON_TAG));
}
@@ -386,12 +415,12 @@
toolbar.add(refreshLayoutAction);
horizontalLayoutAction = new LayoutAction(gv, new HorizontalTreeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING));
- horizontalLayoutAction.setImageDescriptor(Activator.getImageDescriptor("/icons/horizontalTreeLayout.gif"));
+ horizontalLayoutAction.setImageDescriptor(Activator.getImageDescriptor(HORIZONTAL_TREE_LAYOUT_ICON_TAG));
horizontalLayoutAction.setToolTipText("Use Horizontal Tree Layout");
horizontalLayoutAction.addPropertyChangeListener(new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equalsIgnoreCase("checked")) {
+ if (event.getProperty().equalsIgnoreCase("checked")) {//$NON-NLS-1$
Boolean state = (Boolean)event.getNewValue();
if (state.equals(Boolean.TRUE)) {
verticalLayoutAction.setChecked(false);
@@ -407,12 +436,12 @@
toolbar.add(horizontalLayoutAction);
verticalLayoutAction = new LayoutAction(gv, new TreeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING));
- verticalLayoutAction.setImageDescriptor(Activator.getImageDescriptor("/icons/verticalTreeLayout.gif"));
+ verticalLayoutAction.setImageDescriptor(Activator.getImageDescriptor(VERTICAL_TREE_LAYOUT_ICON_TAG));
verticalLayoutAction.setToolTipText("Use Vertical Tree Layout");
verticalLayoutAction.addPropertyChangeListener(new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equalsIgnoreCase("checked")) {
+ if (event.getProperty().equalsIgnoreCase("checked")) {//$NON-NLS-1$
Boolean state = (Boolean)event.getNewValue();
if (state.equals(Boolean.TRUE)) {
horizontalLayoutAction.setChecked(false);
@@ -428,12 +457,12 @@
toolbar.add(verticalLayoutAction);
radialLayoutAction = new LayoutAction(gv, new RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING));
- radialLayoutAction.setImageDescriptor(Activator.getImageDescriptor("/icons/radialLayout.gif"));
+ radialLayoutAction.setImageDescriptor(Activator.getImageDescriptor(RADIAL_LAYOUT_ICON_TAG));
radialLayoutAction.setToolTipText("Use Radial Layout");
radialLayoutAction.addPropertyChangeListener(new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equalsIgnoreCase("checked")) {
+ if (event.getProperty().equalsIgnoreCase("checked")) {//$NON-NLS-1$
Boolean state = (Boolean)event.getNewValue();
if (state.equals(Boolean.TRUE)) {
horizontalLayoutAction.setChecked(false);
@@ -538,5 +567,25 @@
}
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IShowInTarget#show(org.eclipse.ui.part.ShowInContext)
+ */
+ @Override
+ public boolean show(ShowInContext context) {
+ if (gv == null || context == null)
+ return false;
+ ISelection sel = context.getSelection();
+ if (sel instanceof IStructuredSelection) {
+ IStructuredSelection ss = (IStructuredSelection)sel;
+ Object first = ss.getFirstElement();
+ if (first instanceof IFile) {
+ String path = ((IFile)first).getLocation().toOSString();
+ visualizeESB(path);
+ return true;
+ }
+ }
+ return false;
+ }
+
}
12 years, 11 months
JBoss Tools SVN: r38232 - 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: scabanovich
Date: 2012-01-26 18:30:15 -0500 (Thu, 26 Jan 2012)
New Revision: 38232
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorMenuInvoker.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorMenuInvoker.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorMenuInvoker.java 2012-01-26 23:22:39 UTC (rev 38231)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorMenuInvoker.java 2012-01-26 23:30:15 UTC (rev 38232)
@@ -18,9 +18,8 @@
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.graphics.Point;
import org.jboss.tools.common.meta.action.XActionInvoker;
-import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelFactory;
import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.navigator.TreeViewerMenuInvoker;
import org.jboss.tools.common.model.util.FindObjectHelper;
@@ -34,10 +33,7 @@
protected XModelObject getWorkspaceObject() {
if(eclipseWorkspace == null) {
- XModel model = PreferenceModelUtilities.getPreferenceModel();
- if(model != null) {
- eclipseWorkspace = model.createModelObject("EclipseWorkspace", null); //$NON-NLS-1$
- }
+ eclipseWorkspace = XModelFactory.getDefaultInstance().createModelObject("EclipseWorkspace", null); //$NON-NLS-1$
}
return eclipseWorkspace;
}
12 years, 11 months
JBoss Tools SVN: r38231 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-26 18:22:39 -0500 (Thu, 26 Jan 2012)
New Revision: 38231
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/DecoratorTextPreferencesPage.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/DecoratorTextPreferencesPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/DecoratorTextPreferencesPage.java 2012-01-26 22:48:16 UTC (rev 38230)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/preferences/DecoratorTextPreferencesPage.java 2012-01-26 23:22:39 UTC (rev 38231)
@@ -43,8 +43,8 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
+import org.jboss.tools.common.model.XModelFactory;
import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.ModelUIMessages;
import org.jboss.tools.common.model.ui.attribute.adapter.DefaultXModelObjectLabelProvider;
import org.jboss.tools.common.model.ui.navigator.decorator.DecoratorManager;
@@ -102,7 +102,7 @@
} else if(element instanceof String) {
entity = DecoratorManager.getInstance().getBaseEntityForPartition(element.toString());
}
- XModelObject o = entity == null ? null : PreferenceModelUtilities.getPreferenceModel().createModelObject(entity, new Properties());
+ XModelObject o = entity == null ? null : XModelFactory.getDefaultInstance().createModelObject(entity, new Properties());
return (o != null) ? EclipseResourceUtil.getImage(o) : null;
}
12 years, 11 months
JBoss Tools SVN: r38230 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dnd/context.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-26 17:48:16 -0500 (Thu, 26 Jan 2012)
New Revision: 38230
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dnd/context/JSPViewerDropAdapter.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dnd/context/JSPViewerDropAdapter.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dnd/context/JSPViewerDropAdapter.java 2012-01-26 22:10:21 UTC (rev 38229)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dnd/context/JSPViewerDropAdapter.java 2012-01-26 22:48:16 UTC (rev 38230)
@@ -26,7 +26,7 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.eclipse.wst.xml.ui.internal.dnd.XMLDragAndDropManager;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.XModelFactory;
import org.jboss.tools.common.model.ui.dnd.ModelTransfer;
import org.jboss.tools.common.model.ui.editors.dnd.context.DropContext;
import org.jboss.tools.jst.jsp.editor.IJSPTextEditor;
@@ -67,7 +67,7 @@
return extractDragSource(object);
} else if(ModelTransfer.getInstance().isSupportedType(event.currentDataType)) {
List list = new ArrayList();
- Object source = PreferenceModelUtilities.getPreferenceModel().getModelBuffer().source();
+ Object source = XModelFactory.getDefaultInstance().getModelBuffer().source();
if(source != null) list.add(source);
return list;
} else if(dropContext.getFlavor() != null) {
12 years, 11 months
JBoss Tools SVN: r38229 - in trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-tooling: trunk and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dpalmer
Date: 2012-01-26 17:10:21 -0500 (Thu, 26 Jan 2012)
New Revision: 38229
Modified:
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin...
Log:
[JBIDE-10720] Updated Drools from 5.2 to 5.3
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin... 2012-01-26 21:32:14 UTC (rev 38228)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin... 2012-01-26 22:10:21 UTC (rev 38229)
@@ -14,7 +14,7 @@
<!-- SOA Tooling : 9 x 1 = 9 -->
<child location='../../../../staging/jbosstools-3.3_stable_branch.component--bpel/all/repo/'/>
-<child location='../../../../staging/jbosstools-drools-5.2_stable_branch/all/repo/'/>
+<child location='../../../../staging/jbosstools-drools-5.3_stable_branch/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_stable_branch.component--esb/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_stable_branch.component--flow/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_stable_branch.component--jbpm/all/repo/'/>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin... 2012-01-26 21:32:14 UTC (rev 38228)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin... 2012-01-26 22:10:21 UTC (rev 38229)
@@ -14,7 +14,7 @@
<!-- SOA Tooling : 9 x 1 = 9 -->
<child location='../../../../staging/jbosstools-3.3_stable_branch.component--bpel/all/repo/'/>
-<child location='../../../../staging/jbosstools-drools-5.2_stable_branch/all/repo/'/>
+<child location='../../../../staging/jbosstools-drools-5.3_stable_branch/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_stable_branch.component--esb/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_stable_branch.component--flow/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_stable_branch.component--jbpm/all/repo/'/>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin... 2012-01-26 21:32:14 UTC (rev 38228)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin... 2012-01-26 22:10:21 UTC (rev 38229)
@@ -14,7 +14,7 @@
<!-- SOA Tooling : 9 x 2 = 18 -->
<child location='../../../../staging/jbosstools-3.3_trunk.component--bpel/all/repo/'/>
-<child location='../../../../staging/jbosstools-drools-5.2_trunk/all/repo/'/>
+<child location='../../../../staging/jbosstools-drools-5.3_trunk/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_trunk.component--esb/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_trunk.component--flow/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_trunk.component--jbpm/all/repo/'/>
@@ -25,7 +25,7 @@
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--bpel/all/repo/'/>
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--esb/all/repo/'/>
-<child location='../../../../staging.previous/jbosstools-drools-5.2_trunk/all/repo/'/>
+<child location='../../../../staging.previous/jbosstools-drools-5.3_trunk/all/repo/'/>
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--flow/all/repo/'/>
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--jbpm/all/repo/'/>
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--modeshape/all/repo/'/>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin... 2012-01-26 21:32:14 UTC (rev 38228)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/soa-toolin... 2012-01-26 22:10:21 UTC (rev 38229)
@@ -14,7 +14,7 @@
<!-- SOA Tooling : 9 x 2 = 18 -->
<child location='../../../../staging/jbosstools-3.3_trunk.component--bpel/all/repo/'/>
-<child location='../../../../staging/jbosstools-drools-5.2_trunk/all/repo/'/>
+<child location='../../../../staging/jbosstools-drools-5.3_trunk/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_trunk.component--esb/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_trunk.component--flow/all/repo/'/>
<child location='../../../../staging/jbosstools-3.3_trunk.component--jbpm/all/repo/'/>
@@ -25,7 +25,7 @@
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--bpel/all/repo/'/>
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--esb/all/repo/'/>
-<child location='../../../../staging.previous/jbosstools-drools-5.2_trunk/all/repo/'/>
+<child location='../../../../staging.previous/jbosstools-drools-5.3_trunk/all/repo/'/>
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--flow/all/repo/'/>
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--jbpm/all/repo/'/>
<child location='../../../../staging.previous/jbosstools-3.3_trunk.component--modeshape/all/repo/'/>
12 years, 11 months
JBoss Tools SVN: r38228 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-26 16:32:14 -0500 (Thu, 26 Jan 2012)
New Revision: 38228
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Do not create instance of preference XModel when it is not necessary . Use XModelFactory.getDefaultInstance() when XModel instance is required.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java 2012-01-26 21:22:13 UTC (rev 38227)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java 2012-01-26 21:32:14 UTC (rev 38228)
@@ -67,8 +67,8 @@
import org.jboss.tools.common.meta.action.XActionInvoker;
import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
import org.jboss.tools.common.model.XModelException;
+import org.jboss.tools.common.model.XModelFactory;
import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.action.CommandBar;
import org.jboss.tools.common.model.ui.action.XMenuInvoker;
@@ -86,7 +86,7 @@
static final String ATTR_VALUE = "value"; //$NON-NLS-1$
static final String ATTR_ENABLED = "enabled"; //$NON-NLS-1$
- XModelObject property = PreferenceModelUtilities.getPreferenceModel().createModelObject(ENT_PROPERTY, null);
+ XModelObject property = XModelFactory.getDefaultInstance().createModelObject(ENT_PROPERTY, null);
XAttributeSupport nsupport = new XAttributeSupport(property, XEntityDataImpl.create(new String[][]{
{ENT_PROPERTY, "yes"}, //$NON-NLS-1$
{ATTR_NAME, "no"}, //$NON-NLS-1$
12 years, 11 months
JBoss Tools SVN: r38227 - trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/navigator.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-26 16:22:13 -0500 (Thu, 26 Jan 2012)
New Revision: 38227
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/navigator/JsfProjectsNavigator.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Do not create instance of preference XModel when it is not necessary . Use XModelFactory.getDefaultInstance() when XModel instance is required.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/navigator/JsfProjectsNavigator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/navigator/JsfProjectsNavigator.java 2012-01-26 21:18:07 UTC (rev 38226)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/navigator/JsfProjectsNavigator.java 2012-01-26 21:22:13 UTC (rev 38227)
@@ -13,8 +13,8 @@
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.widgets.*;
import org.jboss.tools.common.meta.action.*;
+import org.jboss.tools.common.model.XModelFactory;
import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.views.navigator.*;
public class JsfProjectsNavigator extends NavigatorViewPart {
@@ -36,36 +36,12 @@
}
protected void initContentProvider(TreeViewer viewer) {
- if(true) {
- c = new JsfProjectsContentProvider();
- TreeViewerModelListenerImpl listener = new JsfProjectsTreeListener();
- listener.setViewer(viewer);
- c.setListener(listener);
- contentProvider = c;
- viewer.setContentProvider(contentProvider);
- } else {
- viewer.setContentProvider(
- new ITreeContentProvider() {
- public Object[] getChildren(Object parentElement) {
- return new Object[]{};
- }
- public Object getParent(Object element) {
- return null;
- }
- public boolean hasChildren(Object element) {
- return false;
- }
- public Object[] getElements(Object o) {
- return new Object[]{"no license"}; //$NON-NLS-1$
- }
- public void inputChanged(Viewer v, Object o1,Object o2) {
-
- }
- public void dispose() {
- }
- }
- );
- }
+ c = new JsfProjectsContentProvider();
+ TreeViewerModelListenerImpl listener = new JsfProjectsTreeListener();
+ listener.setViewer(viewer);
+ c.setListener(listener);
+ contentProvider = c;
+ viewer.setContentProvider(contentProvider);
}
protected String[] getActionClasses() {
@@ -86,9 +62,12 @@
}
class JSFNavigatorMenuInvoker extends NavigatorMenuInvoker {
- private static XModelObject jsfWorkspace = PreferenceModelUtilities.getPreferenceModel().createModelObject("JSFWorkspace", null); //$NON-NLS-1$
+ private static XModelObject jsfWorkspace;
protected XModelObject getWorkspaceObject() {
+ if(jsfWorkspace == null) {
+ jsfWorkspace = XModelFactory.getDefaultInstance().createModelObject("JSFWorkspace", null); //$NON-NLS-1$
+ }
return jsfWorkspace;
}
12 years, 11 months
JBoss Tools SVN: r38226 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-26 16:18:07 -0500 (Thu, 26 Jan 2012)
New Revision: 38226
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsNavigator.java
Log:
JBIDE-6132
https://issues.jboss.org/browse/JBIDE-6132
Do not create instance of preference XModel when it is not necessary . Use XModelFactory.getDefaultInstance() when XModel instance is required.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsNavigator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsNavigator.java 2012-01-26 21:16:56 UTC (rev 38225)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsNavigator.java 2012-01-26 21:18:07 UTC (rev 38226)
@@ -17,8 +17,8 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.*;
import org.jboss.tools.common.meta.action.*;
+import org.jboss.tools.common.model.XModelFactory;
import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.views.navigator.*;
public class WebProjectsNavigator extends NavigatorViewPart {
@@ -36,36 +36,12 @@
}
protected void initContentProvider(TreeViewer viewer) {
- if(true) {
- c = new WebProjectsContentProvider();
- TreeViewerModelListenerImpl listener = new WebProjectsTreeListener();
- listener.setViewer(viewer);
- c.setListener(listener);
- contentProvider = c;
- viewer.setContentProvider(contentProvider);
- } else {
- viewer.setContentProvider(
- new ITreeContentProvider() {
- public Object[] getChildren(Object parentElement) {
- return new Object[]{};
- }
- public Object getParent(Object element) {
- return null;
- }
- public boolean hasChildren(Object element) {
- return false;
- }
- public Object[] getElements(Object o) {
- return new Object[]{""}; //$NON-NLS-1$
- }
- public void inputChanged(Viewer v, Object o1,Object o2) {
-
- }
- public void dispose() {
- }
- }
- );
- }
+ c = new WebProjectsContentProvider();
+ TreeViewerModelListenerImpl listener = new WebProjectsTreeListener();
+ listener.setViewer(viewer);
+ c.setListener(listener);
+ contentProvider = c;
+ viewer.setContentProvider(contentProvider);
}
static String STRUTS_UI = "org.jboss.tools.struts.ui"; //$NON-NLS-1$
@@ -91,9 +67,12 @@
}
class JSFNavigatorMenuInvoker extends NavigatorMenuInvoker {
- private static XModelObject webWorkspace = PreferenceModelUtilities.getPreferenceModel().createModelObject("WebWorkspace", null); //$NON-NLS-1$
-
+ private static XModelObject webWorkspace;
+
protected XModelObject getWorkspaceObject() {
+ if(webWorkspace == null) {
+ webWorkspace = XModelFactory.getDefaultInstance().createModelObject("WebWorkspace", null); //$NON-NLS-1$
+ }
return webWorkspace;
}
12 years, 11 months