JBoss Tools SVN: r26186 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-11-02 10:04:08 -0400 (Tue, 02 Nov 2010)
New Revision: 26186
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringChangesFactory.java
Log:
https://jira.jboss.org/browse/JBIDE-6732
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringChangesFactory.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringChangesFactory.java 2010-11-02 13:32:55 UTC (rev 26185)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/RefactoringChangesFactory.java 2010-11-02 14:04:08 UTC (rev 26186)
@@ -97,6 +97,9 @@
}
}
} else if (resource instanceof IFolder) {
+ if(resource.getName().startsWith(".")) //$NON-NLS-1$
+ return;
+
IResource[] children = ((IFolder) resource).members();
if (children != null) {
for (int i = 0; i < children.length; i++) {
@@ -173,6 +176,9 @@
}
}
} else if (resource instanceof IFolder) {
+ if(resource.getName().startsWith(".")) //$NON-NLS-1$
+ return;
+
IResource[] children = ((IFolder) resource).members();
if (children != null) {
for (int i = 0; i < children.length; i++) {
14 years, 11 months
JBoss Tools SVN: r26185 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-02 09:32:55 -0400 (Tue, 02 Nov 2010)
New Revision: 26185
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Log:
[JBIDE-7484] split method #buildInstance
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-11-02 12:49:16 UTC (rev 26184)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-11-02 13:32:55 UTC (rev 26185)
@@ -46,6 +46,7 @@
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Path;
+import org.jboss.tools.deltacloud.core.client.Instance.Action;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -437,12 +438,7 @@
instance.setState(getElementText(document, "state").get(0)); //$NON-NLS-1$
getAuthentication(document, instance);
- ArrayList<Instance.Action> actions = new ArrayList<Instance.Action>();
- for (String s : getAttributeValues(document, "link", "rel")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- actions.add(Instance.Action.valueOf(s.toUpperCase()));
- }
- instance.setActions(actions);
+ instance.setActions(createActions(instance, document));
return instance;
// } catch (DeltaCloudClientException e) {
@@ -453,6 +449,15 @@
}
}
+ private List<Action> createActions(Instance instance, Document document) {
+ ArrayList<Instance.Action> actions = new ArrayList<Instance.Action>();
+ for (String s : getAttributeValues(document, "link", "rel")) //$NON-NLS-1$ //$NON-NLS-2$
+ {
+ actions.add(Instance.Action.valueOf(s.toUpperCase()));
+ }
+ return actions;
+ }
+
private HardwareProfile buildHardwareProfile(String xml) throws DeltaCloudClientException {
try {
HardwareProfile profile = JAXB.unmarshal(new StringReader(xml), HardwareProfile.class);
14 years, 11 months
JBoss Tools SVN: r26184 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-11-02 08:49:16 -0400 (Tue, 02 Nov 2010)
New Revision: 26184
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/VPEPropertyTester.java
Log:
https://jira.jboss.org/browse/JBIDE-7383
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/VPEPropertyTester.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/VPEPropertyTester.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/VPEPropertyTester.java 2010-11-02 12:49:16 UTC (rev 26184)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.vpe.editor.toolbar;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class VPEPropertyTester extends PropertyTester{
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args,
+ Object expectedValue) {
+ return !JspEditorPlugin.getDefault().getPreferenceStore()
+ .getBoolean(IVpePreferencesPage.SHOW_VISUAL_TOOLBAR);
+ }
+}
14 years, 11 months
JBoss Tools SVN: r26183 - in trunk: vpe/plugins/org.jboss.tools.vpe and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-11-02 08:24:36 -0400 (Tue, 02 Nov 2010)
New Revision: 26183
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpePreferencesPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-7383, configuration which allows select show action on vpe toolbar, eather on main eclipse toolbar has been added
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java 2010-11-02 11:06:56 UTC (rev 26182)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java 2010-11-02 12:24:36 UTC (rev 26183)
@@ -21,6 +21,7 @@
static final String DEFAULT_VPE_TAB = "Default VPE Tab"; //$NON-NLS-1$
static final String VISUAL_SOURCE_EDITORS_SPLITTING = "Visual/Source Editors Splitting"; //$NON-NLS-1$
static final String VISUAL_SOURCE_EDITORS_WEIGHTS = "Size of Visual Editor Pane 0-100%"; //$NON-NLS-1$
+ static final String SHOW_VISUAL_TOOLBAR = "Show VPE Toolbar"; //$NON-NLS-1$
static final String DEFAULT_VPE_TAB_VISUAL_SOURCE_VALUE = "0"; //$NON-NLS-1$
static final String DEFAULT_VPE_TAB_SOURCE_VALUE = "1"; //$NON-NLS-1$
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java 2010-11-02 11:06:56 UTC (rev 26182)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java 2010-11-02 12:24:36 UTC (rev 26183)
@@ -21,7 +21,7 @@
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(JspEditorPlugin.PLUGIN_ID);
-
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_VISUAL_TOOLBAR, false);
defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS, true);
defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_NON_VISUAL_TAGS, false);
defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_TEXT_FORMATTING, true);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-11-02 11:06:56 UTC (rev 26182)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-11-02 12:24:36 UTC (rev 26183)
@@ -164,19 +164,6 @@
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="org.jboss.tools.ui.vpe.editor">
- <or>
- <with variable="activeEditorId">
- <equals value="org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor"/>
- </with>
- <with variable="activeEditorId">
- <equals value="org.jboss.tools.jst.jsp.jspeditor.HTMLTextEditor"/>
- </with>
- <with variable="activeEditorId">
- <equals value="org.jboss.tools.jst.jsp.jspeditor.DocBookEditor"/>
- </with>
- </or>
- </definition>
- <definition id="org.jboss.tools.ui.vpe.editor.invisibleByDefault">
<and>
<or>
<with variable="activeEditorId">
@@ -189,18 +176,15 @@
<equals value="org.jboss.tools.jst.jsp.jspeditor.DocBookEditor"/>
</with>
</or>
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.jboss.tools.jst.jsp.toolbars.sampleToolbar">
- </equals>
- </iterate>
- </with>
+ <with
+ variable="selection">
+ <test
+ property="org.jboss.tools.vpe.showiconsonmaintoolbar">
+ </test>
+ </with>
</and>
</definition>
- </extension>
+ </extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
@@ -302,7 +286,7 @@
id="org.jboss.tools.vpe.toolbars.preferencesCommand"
tooltip="%vpe.toolbar.preferences">
<visibleWhen checkEnabled="false">
- <reference definitionId="org.jboss.tools.ui.vpe.editor.invisibleByDefault"/>
+ <reference definitionId="org.jboss.tools.ui.vpe.editor"/>
</visibleWhen>
</command>
<command
@@ -320,7 +304,7 @@
id="org.jboss.tools.vpe.toolbars.pageDesignOptionsCommand"
tooltip="%vpe.toolbar.page_design_options">
<visibleWhen checkEnabled="false">
- <reference definitionId="org.jboss.tools.ui.vpe.editor.invisibleByDefault"/>
+ <reference definitionId="org.jboss.tools.ui.vpe.editor"/>
</visibleWhen>
</command>
<command
@@ -338,7 +322,7 @@
id="org.jboss.tools.vpe.toolbars.showBorderCommand"
tooltip="%vpe.toolbar.show_border">
<visibleWhen checkEnabled="false">
- <reference definitionId="org.jboss.tools.ui.vpe.editor.invisibleByDefault"/>
+ <reference definitionId="org.jboss.tools.ui.vpe.editor"/>
</visibleWhen>
</command>
<command
@@ -348,7 +332,7 @@
id="org.jboss.tools.vpe.toolbars.showNonVisualTagsCommand"
tooltip="%vpe.toolbar.show_non_visual_tags">
<visibleWhen checkEnabled="false">
- <reference definitionId="org.jboss.tools.ui.vpe.editor.invisibleByDefault"/>
+ <reference definitionId="org.jboss.tools.ui.vpe.editor"/>
</visibleWhen>
</command>
<command
@@ -369,19 +353,11 @@
id="org.jboss.tools.vpe.toolbars.showBundleAsELCommand"
tooltip="%vpe.toolbar.show_bundle_as_el">
<visibleWhen checkEnabled="false">
- <reference definitionId="org.jboss.tools.ui.vpe.editor.invisibleByDefault"/>
+ <reference definitionId="org.jboss.tools.ui.vpe.editor"/>
</visibleWhen>
</command>
</menuContribution>
</extension>
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet label="%vpe.toolbar.name"
- description="Contains Vpe Configuration ToolBar Items"
- id="org.jboss.tools.jst.jsp.toolbars.sampleToolbar"
- visible="false">
- </actionSet>
- </extension>
<extension
point="org.eclipse.ui.exportWizards">
<wizard
@@ -433,4 +409,14 @@
class="org.jboss.tools.vpe.handlers.ShowBundleAsELHandler"
commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"/>
</extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.jboss.tools.vpe.editor.toolbar.VPEPropertyTester"
+ id="org.jboss.tools.vpe.toolbar"
+ namespace="org.jboss.tools.vpe"
+ properties="showiconsonmaintoolbar"
+ type="java.lang.Object">
+ </propertyTester>
+ </extension>
</plugin>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-11-02 11:06:56 UTC (rev 26182)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-11-02 12:24:36 UTC (rev 26183)
@@ -318,9 +318,9 @@
* Restore the state after switching from Preview, for example.
*/
// selectionBar.setVisible(selectionBar.getAlwaysVisibleOption());
- //added by Maksim Areshkau, here we remove Visual Page Editor Toolbar
// setVerticalToolbarVisible(true);
- setVerticalToolbarVisible(false);
+ setVerticalToolbarVisible(JspEditorPlugin.getDefault().getPreferenceStore()
+ .getBoolean(IVpePreferencesPage.SHOW_VISUAL_TOOLBAR));
/*
* Fixes https://jira.jboss.org/jira/browse/JBIDE-3140
* author Denis Maliarevich.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpePreferencesPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpePreferencesPage.java 2010-11-02 11:06:56 UTC (rev 26182)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpePreferencesPage.java 2010-11-02 12:24:36 UTC (rev 26183)
@@ -55,6 +55,7 @@
private Group visualAppearanceGroup;
private Group confirmationGroup;
private Group tabsGroup;
+ private Group visualEditorToolbarGroup;
public VpePreferencesPage() {
super();
@@ -84,39 +85,46 @@
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
pageContainer.setLayout(layout);
pageContainer.setLayoutData(gd);
+
+ visualEditorToolbarGroup = createLayoutGroup(pageContainer, SWT.SHADOW_ETCHED_IN, VpeUIMessages.VISUAL_EDITOR_TOOLBAR_BEHAVIOR);
- visualAppearanceGroup = new Group(pageContainer, SWT.SHADOW_ETCHED_IN);
- visualAppearanceGroup
- .setText(VpeUIMessages.VISUAL_APPEARANCE_GROUP_TITLE);
- layout = new GridLayout();
- layout.marginHeight = 10;
- layout.marginWidth = 10;
- layout.horizontalSpacing = 10;
- layout.verticalSpacing = 10;
- visualAppearanceGroup.setLayout(layout);
- gd = new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1);
- visualAppearanceGroup.setLayoutData(gd);
+ visualAppearanceGroup = createLayoutGroup(pageContainer, SWT.SHADOW_ETCHED_IN, VpeUIMessages.VISUAL_APPEARANCE_GROUP_TITLE);
+// new Group(pageContainer, SWT.SHADOW_ETCHED_IN);
+// visualAppearanceGroup
+// .setText(VpeUIMessages.VISUAL_APPEARANCE_GROUP_TITLE);
+// layout = new GridLayout();
+// layout.marginHeight = 10;
+// layout.marginWidth = 10;
+// layout.horizontalSpacing = 10;
+// layout.verticalSpacing = 10;
+// visualAppearanceGroup.setLayout(layout);
+// gd = new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1);
+// visualAppearanceGroup.setLayoutData(gd);
- confirmationGroup = new Group(pageContainer, SWT.SHADOW_ETCHED_IN);
- confirmationGroup.setText(VpeUIMessages.CONFIRMATION_GROUP_TITLE);
- layout = new GridLayout();
- layout.marginHeight = 10;
- layout.marginWidth = 10;
- layout.horizontalSpacing = 10;
- layout.verticalSpacing = 10;
- confirmationGroup.setLayout(layout);
- gd = new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1);
- confirmationGroup.setLayoutData(gd);
+ confirmationGroup = createLayoutGroup(pageContainer, SWT.SHADOW_ETCHED_IN, VpeUIMessages.CONFIRMATION_GROUP_TITLE);
- tabsGroup = new Group(pageContainer, SWT.SHADOW_ETCHED_IN);
- tabsGroup.setText(VpeUIMessages.TABS_GROUP_TITLE);
- layout = new GridLayout();
- layout.marginHeight = 10;
- layout.marginWidth = 10;
- tabsGroup.setLayout(layout);
- gd = new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1);
- tabsGroup.setLayoutData(gd);
+// new Group(pageContainer, SWT.SHADOW_ETCHED_IN);
+// confirmationGroup.setText(VpeUIMessages.CONFIRMATION_GROUP_TITLE);
+// layout = new GridLayout();
+// layout.marginHeight = 10;
+// layout.marginWidth = 10;
+// layout.horizontalSpacing = 10;
+// layout.verticalSpacing = 10;
+// confirmationGroup.setLayout(layout);
+// gd = new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1);
+// confirmationGroup.setLayoutData(gd);
+ tabsGroup = createLayoutGroup(pageContainer, SWT.SHADOW_ETCHED_IN, VpeUIMessages.TABS_GROUP_TITLE);
+
+// new Group(pageContainer, SWT.SHADOW_ETCHED_IN);
+// tabsGroup.setText(VpeUIMessages.TABS_GROUP_TITLE);
+// layout = new GridLayout();
+// layout.marginHeight = 10;
+// layout.marginWidth = 10;
+// tabsGroup.setLayout(layout);
+// gd = new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1);
+// tabsGroup.setLayoutData(gd);
+
createFieldEditors();
initialize();
checkState();
@@ -131,6 +139,9 @@
@Override
protected void createFieldEditors() {
+ addField(new BooleanFieldEditor(SHOW_VISUAL_TOOLBAR,
+ VpeUIMessages.SHOW_VPE_TOOLBAR,
+ visualEditorToolbarGroup));
addField(new BooleanFieldEditor(SHOW_BORDER_FOR_UNKNOWN_TAGS,
VpeUIMessages.SHOW_BORDER_FOR_UNKNOWN_TAGS,
visualAppearanceGroup));
@@ -193,5 +204,26 @@
public IPreferenceStore getPreferenceStore() {
return JspEditorPlugin.getDefault().getPreferenceStore();
}
-
+/**
+ * Creates a layout group for vpe preferencess
+ * @param parent
+ * @param style
+ * @param groupTitle
+ * @return layut grop for VPE Preferences
+ * @author mareshkau
+ */
+ private static Group createLayoutGroup(final Composite parent,final int style, final String groupTitle){
+ Group prefGroup = new Group(parent, style);
+ prefGroup
+ .setText(groupTitle);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 10;
+ layout.marginWidth = 10;
+ layout.horizontalSpacing = 10;
+ layout.verticalSpacing = 10;
+ prefGroup.setLayout(layout);
+ GridData gd = new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1);
+ prefGroup.setLayoutData(gd);
+ return prefGroup;
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-11-02 11:06:56 UTC (rev 26182)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-11-02 12:24:36 UTC (rev 26183)
@@ -120,6 +120,8 @@
public static String INCLUDED_CSS_FILES_ABOUT;
public static String INCLUDED_TAG_LIBS_ABOUT;
public static String SUBSTITUTED_EL_EXPRESSIONS_ABOUT;
+ public static String VISUAL_EDITOR_TOOLBAR_BEHAVIOR;
+ public static String SHOW_VPE_TOOLBAR;
public static String GENERAL_TAB_TITLE;
public static String VPE_PREFERENCES_PAGE_DESCRIPTION;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-11-02 11:06:56 UTC (rev 26182)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-11-02 12:24:36 UTC (rev 26183)
@@ -110,6 +110,7 @@
GENERAL_TAB_TITLE=General
VPE_PREFERENCES_PAGE_DESCRIPTION=Visual Page Editor settings
SHOW_BORDER_FOR_UNKNOWN_TAGS=Show border for unknown tags
+SHOW_VPE_TOOLBAR = Show VPE editor Action on VPE toolbar, otherwise they will be shown on\n main eclipse toolbar
SHOW_SELECTION_TAG_BAR=Show selection tag bar
SHOW_TEXT_FORMATTING = Show text formatting bar
HIDE_TEXT_FORMATTING = Hide text formatting bar
@@ -122,6 +123,7 @@
VISUAL_SOURCE_EDITORS_SPLITTING=Visual/Source editors splitting
VISUAL_SOURCE_EDITORS_WEIGHTS=Size of the Visual Editor pane (0-100%)
VISUAL_APPEARANCE_GROUP_TITLE=Visual appearance
+VISUAL_EDITOR_TOOLBAR_BEHAVIOR=Visual Editor Toolbar Behavior
CONFIRMATION_GROUP_TITLE=Confirmation and details
TABS_GROUP_TITLE=Default tab, splitting and editor's weights to start VPE with
14 years, 11 months
JBoss Tools SVN: r26182 - in trunk/jsf: plugins/org.jboss.tools.jsf.vpe.richfaces/templates and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-11-02 07:06:56 -0400 (Tue, 02 Nov 2010)
New Revision: 26182
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/select.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/select.xhtml.xml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
added template for <rich:select> element (https://jira.jboss.org/browse/JBIDE-7448)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java 2010-11-02 11:06:24 UTC (rev 26181)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java 2010-11-02 11:06:56 UTC (rev 26182)
@@ -38,9 +38,8 @@
readAttributes(pageContext, sourceNode);
nsIDOMElement wrapper = visualDocument.createElement(HTML.TAG_SPAN);
- nsIDOMElement element = showButton ? visualDocument
- .createElement(HTML.TAG_SELECT) : visualDocument
- .createElement(HTML.TAG_INPUT);
+ String elementName = showButton ? HTML.TAG_SELECT : HTML.TAG_INPUT;
+ nsIDOMElement element = visualDocument.createElement(elementName);
if (disabled) {
element.setAttribute(RichFaces.ATTR_DISABLED,
RichFaces.ATTR_DISABLED);
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java 2010-11-02 11:06:56 UTC (rev 26182)
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Template for the <rich:select> component.
+ *
+ * @author dvinnichek
+ */
+public class RichFacesSelectTemplate extends AbstractEditableRichFacesTemplate {
+
+ private String defaultLabel;
+ private boolean showButton;
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ readAttributes(pageContext, sourceNode);
+
+ nsIDOMElement wrapper = visualDocument.createElement(HTML.TAG_SPAN);
+ String elementName = showButton ? HTML.TAG_SELECT : HTML.TAG_INPUT;
+ nsIDOMElement element = visualDocument.createElement(elementName);
+ if (defaultLabel != null) {
+ if (HTML.TAG_INPUT.equals(elementName)) {
+ element.setAttribute(RichFaces.ATTR_VALUE, defaultLabel);
+ }
+ if (HTML.TAG_SELECT.equals(elementName)) {
+ nsIDOMElement option = visualDocument.createElement(HTML.TAG_OPTION);
+ nsIDOMText text = visualDocument.createTextNode(defaultLabel);
+ option.appendChild(text);
+ element.appendChild(option);
+ }
+ }
+ wrapper.appendChild(element);
+ VpeCreationData creationData = new VpeCreationData(wrapper);
+
+ return creationData;
+ }
+
+ /**
+ * Read attributes from the source element.
+ *
+ * @param sourceNode
+ * the source node
+ */
+ private void readAttributes(VpePageContext pageContext, Node sourceNode) {
+
+ Element sourceElement = (Element) sourceNode;
+
+ // defaultLabel
+ defaultLabel = sourceElement.hasAttribute(RichFaces.ATTR_DEFAULT_LABEL) ? sourceElement
+ .getAttribute(RichFaces.ATTR_DEFAULT_LABEL) : null;
+
+ // showButton
+ showButton = sourceElement.hasAttribute(RichFaces.ATTR_SHOW_BUTTON) ? Constants.TRUE
+ .equalsIgnoreCase(sourceElement
+ .getAttribute(RichFaces.ATTR_SHOW_BUTTON)) : true;
+ }
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSelectTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2010-11-02 11:06:24 UTC (rev 26181)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2010-11-02 11:06:56 UTC (rev 26182)
@@ -795,5 +795,14 @@
</vpe:dnd>
</vpe:template>
</vpe:tag>
+ <vpe:tag name="rich:select" case-sensitive="yes">
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSelectTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/select.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/select.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/select.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/select.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/select.xhtml.xml 2010-11-02 11:06:56 UTC (rev 26182)
@@ -0,0 +1,22 @@
+<tests>
+ <test id="select1">
+ <SPAN>
+ <SELECT>
+ </SELECT>
+ </SPAN>
+ </test>
+ <test id="select2">
+ <SPAN>
+ <SELECT>
+ <OPTION>
+ start typing for select
+ </OPTION>
+ </SELECT>
+ </SPAN>
+ </test>
+ <test id="select3">
+ <SPAN>
+ <INPUT VALUE="please select" />
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/select.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2010-11-02 11:06:24 UTC (rev 26181)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2010-11-02 11:06:56 UTC (rev 26182)
@@ -376,6 +376,10 @@
performContentTest("components/autocomplete.xhtml");//$NON-NLS-1$
}
+ public void testSelect() throws Throwable {
+ performContentTest("components/select.xhtml");//$NON-NLS-1$
+ }
+
@Override
protected String getTestProjectName() {
return RichFacesAllTests.IMPORT_PROJECT_NAME;
14 years, 11 months
JBoss Tools SVN: r26181 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-02 07:06:24 -0400 (Tue, 02 Nov 2010)
New Revision: 26181
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
[JBIDE-7482] fixed missing label
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-02 11:05:50 UTC (rev 26180)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-02 11:06:24 UTC (rev 26181)
@@ -1,5 +1,6 @@
2010-11-02 André Dietisheim <adietish(a)redhat.com>
+ * src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties: [JBIDE-7482] fixed missing label
* plugin.xml: [JBIDE-7479] removed all but 'create new cloud connection' commands from view local menu,
removed destroy image command from running instances & removed reboot command from stopped instances
* src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java (getFirstElement):
14 years, 11 months
JBoss Tools SVN: r26180 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-02 07:05:50 -0400 (Tue, 02 Nov 2010)
New Revision: 26180
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
Log:
[JBIDE-7482] fixed missing label
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-11-02 10:54:39 UTC (rev 26179)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-11-02 11:05:50 UTC (rev 26180)
@@ -56,6 +56,7 @@
ConnectingRSE.msg=Connecting instance as: {0}
ConfirmCloudDelete.title=Confirm Cloud Disconnect
ConfirmCloudDelete.msg=Please choose the clouds that shall be disconnected by checking them:
+CreateInstance.label=Launch Instance
NAME=Name
ID=ID
14 years, 11 months
JBoss Tools SVN: r26179 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-02 06:54:39 -0400 (Tue, 02 Nov 2010)
New Revision: 26179
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
[JBIDE-7479] updated changelog
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-02 10:49:55 UTC (rev 26178)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-11-02 10:54:39 UTC (rev 26179)
@@ -1,3 +1,10 @@
+2010-11-02 André Dietisheim <adietish(a)redhat.com>
+
+ * plugin.xml: [JBIDE-7479] removed all but 'create new cloud connection' commands from view local menu,
+ removed destroy image command from running instances & removed reboot command from stopped instances
+ * src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java (getFirstElement):
+ [JBIDE-7481] added check for null
+
2010-10-29 André Dietisheim <adietish(a)redhat.com>
* plugin.xml: [JBIDE-7367] implemented correct visibility for start and stop instance.
14 years, 11 months
JBoss Tools SVN: r26178 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-02 06:49:55 -0400 (Tue, 02 Nov 2010)
New Revision: 26178
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
Log:
[JBIDE-7479] removed all commands but the 'create new cloud connection'
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-11-02 10:48:27 UTC (rev 26177)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-11-02 10:49:55 UTC (rev 26178)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
-
<extension
point="org.eclipse.ui.views">
<category
@@ -532,85 +531,6 @@
<menuContribution
allPopups="true"
locationURI="menu:org.jboss.tools.deltacloud.ui.views.DeltaCloudView">
- <!-- instance commands -->
- <command
- commandId="org.jboss.tools.deltacloud.ui.startinstance"
- disabledIcon="icons/runningd.gif"
- icon="icons/running.gif"
- label="%command.startinstance.label"
- style="push"
- tooltip="%command.startinstance.tooltip">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.stopinstance"
- disabledIcon="icons/stoppedd.gif"
- icon="icons/stopped.gif"
- label="%command.stopinstance.label"
- style="push"
- tooltip="%command.stopinstance.tooltip">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.rebootinstance"
- disabledIcon="icons/rebootd.gif"
- icon="icons/reboot.gif"
- label="%command.rebootinstance.label"
- style="push"
- tooltip="%command.rebootinstance.tooltip">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.destroyinstance"
- label="%command.destroyinstance.label"
- style="push"
- tooltip="%command.destroyinstance.tooltip">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <separator
- name="additions"
- visible="true">
- </separator>
<!-- connection commands -->
<command
commandId="org.jboss.tools.deltacloud.ui.newconnection"
@@ -618,92 +538,13 @@
style="push"
tooltip="%command.newconnection.tooltip">
</command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.editconnection"
- label="%command.editconnection.label"
- style="push"
- tooltip="%command.editconnection.tooltip">
- </command>
- <command
- commandId="org.eclipse.ui.edit.delete"
- label="%command.disconnectcloud.label"
- style="push"
- tooltip="%command.disconnectcloud.tooltip">
- </command>
- <!-- image commands -->
- <command
- commandId="org.jboss.tools.deltacloud.ui.createinstance"
- icon="icons/instance.gif"
- label="%command.createinstance.label"
- style="push"
- tooltip="%command.createinstance.tooltip">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.createinstance2"
- icon="icons/instance.gif"
- label="%command.createinstance.label"
- style="push"
- tooltip="%command.createinstance.tooltip">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.filterimages"
- label="%command.filterimages.label"
- style="push"
- tooltip="%command.filterimages.tooltip">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.jboss.tools.deltacloud.ui.filterinstances"
- label="%command.filterinstances.label"
- style="push"
- tooltip="%command.filterinstances.tooltip">
- <visibleWhen
- checkEnabled="true">
- <with
- variable="selection">
- <iterate>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
+ <separator
+ name="additions"
+ visible="true">
+ </separator>
</menuContribution>
</extension>
- <!-- Commands -->
+ <!-- Commands ========================================= -->
<extension
point="org.eclipse.ui.commands">
<command
14 years, 11 months
JBoss Tools SVN: r26177 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools: internal/deltacloud/ui/utils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-02 06:48:27 -0400 (Tue, 02 Nov 2010)
New Revision: 26177
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java
Log:
[JBIDE-7481] refresh now does not throw execptions any more if no item is selected in the cloud viewer
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java 2010-11-02 10:19:29 UTC (rev 26176)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RefreshCloudHandler.java 2010-11-02 10:48:27 UTC (rev 26177)
@@ -44,7 +44,6 @@
cloudViewElement = (CloudViewElement) cloudViewElement.getParent();
CVCloudElement cloud = (CVCloudElement) cloudViewElement;
cloud.loadChildren();
-
}
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java 2010-11-02 10:19:29 UTC (rev 26176)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java 2010-11-02 10:48:27 UTC (rev 26177)
@@ -96,7 +96,7 @@
{
Assert.isTrue( selection instanceof IStructuredSelection );
Object firstElement = ( ( IStructuredSelection ) selection ).getFirstElement();
- if ( expectedClass.isAssignableFrom( firstElement.getClass() ) )
+ if ( firstElement != null && expectedClass.isAssignableFrom( firstElement.getClass() ) )
{
return ( T ) firstElement;
}
14 years, 11 months