JBoss Tools SVN: r26072 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-10-26 13:07:53 -0400 (Tue, 26 Oct 2010)
New Revision: 26072
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar/SelectionBar.java
Log:
https://jira.jboss.org/browse/JBIDE-7387: No nodes in the VPE Selection Bar initially
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar/SelectionBar.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar/SelectionBar.java 2010-10-26 15:59:22 UTC (rev 26071)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar/SelectionBar.java 2010-10-26 17:07:53 UTC (rev 26072)
@@ -19,7 +19,6 @@
import org.eclipse.core.commands.ICommandListener;
import org.eclipse.core.commands.IStateListener;
import org.eclipse.core.commands.State;
-import org.eclipse.gef.Handle;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.SWT;
@@ -53,7 +52,6 @@
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
@@ -186,8 +184,7 @@
toolbarData.top = new FormAttachment(0);
toolbar.setLayoutData(toolbarData);
createArrowButton();
- realBar.layout();
- this.getParent().layout(true, true);
+
setVisible(toggleSelBarCommand.isEnabled()&&(Boolean)toggleSelBarState.getValue());
return splitter;
}
@@ -204,7 +201,16 @@
splitter.setVisible(realBar, false);
splitter.setVisible(emptyBar, true);
}
+
+ /* JBIDE-7387:
+ * By default toolbar size is set to fit regular button ToolItems.
+ * But drop-down items are a little bigger and do not
+ * fit in the default-size toolbars (at least under Windows XP).
+ * This temporary ToolItem is needed to set enough size to the toolbar.*/
+ ToolItem tempItem = new ToolItem(toolbar, SWT.DROP_DOWN);
+ tempItem.setText("foo"); //$NON-NLS-1$
this.getParent().layout(true, true);
+ tempItem.dispose();
}
@@ -276,10 +282,6 @@
* appropriate the {@code node} and all its ancestors.
*/
private void setSelBarItems(Node node) {
- // bug was fixed when toolbar are not shown for resizeble components
- realBar.layout();
- this.getParent().layout(true, true);
-
removeNodeListenerFromAllNodes();
cleanToolBar(toolbar);
@@ -308,7 +310,7 @@
* for the last tag -- show check button
*/
if ((elementCounter == 0) && (list.size() == 0)){
- item = new ToolItem(toolbar, SWT.FLAT | SWT.CHECK, 1);
+ item = new ToolItem(toolbar, SWT.FLAT | SWT.CHECK, 1);
item.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
handleSelectionEvent(e);
14 years, 1 month
JBoss Tools SVN: r26071 - in trunk/seam/tests/org.jboss.tools.seam.ui.test: src/org/jboss/tools/seam/ui/test/wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-10-26 11:59:22 -0400 (Tue, 26 Oct 2010)
New Revision: 26071
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7219
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2010-10-26 15:17:02 UTC (rev 26070)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2010-10-26 15:59:22 UTC (rev 26071)
@@ -32,7 +32,11 @@
org.jboss.tools.common.el.ui,
org.jboss.tools.jsf.text.ext,
org.eclipse.datatools.enablement.hsqldb,
- org.eclipse.debug.core
+ org.eclipse.debug.core,
+ org.eclipse.jst.jsf.ui;bundle-version="1.3.0",
+ org.eclipse.jst.common.project.facet.core;bundle-version="1.4.100",
+ org.eclipse.jst.jsf.core;bundle-version="1.3.0",
+ org.eclipse.wst.common.frameworks.ui;bundle-version="1.2.0"
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.ca,
org.jboss.tools.seam.ui.test.hyperlink,
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2010-10-26 15:17:02 UTC (rev 26070)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2010-10-26 15:59:22 UTC (rev 26071)
@@ -11,6 +11,8 @@
package org.jboss.tools.seam.ui.test.wizard;
import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import java.text.MessageFormat;
import junit.extensions.TestSetup;
@@ -23,9 +25,16 @@
import org.eclipse.datatools.connectivity.ConnectionProfileException;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
+import org.eclipse.jst.jsf.ui.internal.project.facet.JSFFacetInstallPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.jboss.tools.jst.firstrun.JBossASAdapterInitializer;
@@ -86,6 +95,10 @@
}
public void testSeamProjectNewWizardFinisDisableByDefaul() {
+ // Disable Library Configuration
+ disableLibraryConfiguration();
+ JobUtils.delay(1000);
+
boolean canFinish = wizard.canFinish();
assertFalse("Finish button is enabled at first wizard page before all requerd fileds are valid.", canFinish);
}
@@ -96,12 +109,64 @@
* See http://jira.jboss.com/jira/browse/JBIDE-1111
*/
public void testJiraJbide1111() {
+ // Disable Library Configuration
+ disableLibraryConfiguration();
+ JobUtils.delay(1000);
+
// Set project name
- IDataModel model = wizard.getDataModel();
- model.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, "testSeamProject");
+ wizard.getDataModel().setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, "testSeamProject");
JobUtils.delay(1000);
+
assertTrue("Finish button is disabled at first wizard page in spite of created JBoss AS Runtime, Server, DB Connection and Seam Runtime and valid project name.", wizard.canFinish());
}
+
+ private void disableLibraryConfiguration(){
+ for(IWizardPage page : wizard.getPages()){
+ if(page instanceof JSFFacetInstallPage){
+ JSFFacetInstallPage jsfPage = (JSFFacetInstallPage)page;
+ Control control = page.getControl();
+ if(control instanceof Composite){
+ processComposite((Composite)control);
+ }
+ }
+ }
+ }
+
+ private void processComposite(Composite parent){
+ for(Control child : parent.getChildren()){
+ if(child instanceof Combo){
+ Combo combo = (Combo)child;
+
+ int index = -1;
+ for(int i=0; i < combo.getItemCount();i++){
+ String item = combo.getItem(i);
+ if("Disable Library Configuration".equals(item)){
+ index = i;
+ break;
+ }
+ }
+ if(index >= 0){
+ combo.select(index);
+ try{
+ Method method = Widget.class.getDeclaredMethod("sendEvent",new Class[]{int.class});
+ if(method != null){
+ method.setAccessible(true);
+ method.invoke(combo, new Object[]{SWT.Selection});
+ }
+ }catch(NoSuchMethodException ex){
+ ex.printStackTrace();
+ }catch(InvocationTargetException ex){
+ ex.printStackTrace();
+ }catch(IllegalAccessException ex){
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ if(child instanceof Composite)
+ processComposite((Composite)child);
+ }
+ }
@Override
protected void tearDown() throws Exception {
14 years, 1 month
JBoss Tools SVN: r26070 - in trunk/vpe/plugins/org.jboss.tools.vpe: icons and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-10-26 11:17:02 -0400 (Tue, 26 Oct 2010)
New Revision: 26070
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/icons/text-formatting.gif
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
moved some vpe toolbar buttons to external toolbar (https://jira.jboss.org/browse/JBIDE-4701)
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/text-formatting.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/text-formatting.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-10-26 15:01:22 UTC (rev 26069)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-10-26 15:17:02 UTC (rev 26070)
@@ -87,14 +87,14 @@
id="org.eclipse.ui.commands.toggleState">
</state>
</command>
- <!--command categoryId="org.jboss.tools.vpe.category"
+ <command categoryId="org.jboss.tools.vpe.category"
id="org.jboss.tools.vpe.commands.showTextFormattingCommand"
name="%vpe.toolbar.show_text_formatting">
<state
class="org.eclipse.ui.handlers.RegistryToggleState:false"
id="org.eclipse.ui.commands.toggleState">
</state>
- </command-->
+ </command>
<command categoryId="org.jboss.tools.vpe.category"
id="org.jboss.tools.vpe.commands.showBundleAsELCommand"
name="%vpe.toolbar.show_bundle_as_el">
@@ -147,11 +147,11 @@
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
contextId="org.eclipse.ui.contexts.window"
sequence="M1+M2+6"/>
- <!--key
+ <key
commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
contextId="org.eclipse.ui.contexts.window"
- sequence="M1+M2+7"/-->
+ sequence="M1+M2+7"/>
<key
commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
@@ -218,12 +218,12 @@
style="toggle"
id="org.jboss.tools.vpe.menus.showNonVisualTagsCommand"
mnemonic="S"/>
- <!--command
+ <command
commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
icon="icons/text-formatting.gif"
style="toggle"
id="org.jboss.tools.vpe.menus.showTextFormattingCommand"
- mnemonic="S"/-->
+ mnemonic="S"/>
<command
commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
icon="icons/bundle-as-el.gif"
@@ -292,7 +292,7 @@
<reference definitionId="org.jboss.tools.ui.structuredEditor"/>
</visibleWhen>
</command>
- <!--command
+ <command
commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
icon="icons/text-formatting.gif"
style="toggle"
@@ -301,7 +301,7 @@
<visibleWhen checkEnabled="false">
<reference definitionId="org.jboss.tools.ui.structuredEditor"/>
</visibleWhen>
- </command-->
+ </command>
<command
commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
icon="icons/bundle-as-el.gif"
@@ -380,9 +380,9 @@
<handler
class="org.jboss.tools.vpe.handlers.ShowNonVisualTagsHandler"
commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"/>
- <!--handler
+ <handler
class="org.jboss.tools.vpe.handlers.ShowTextFormattingHandler"
- commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"/-->
+ commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"/>
<handler
class="org.jboss.tools.vpe.handlers.ShowBundleAsELHandler"
commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"/>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-10-26 15:01:22 UTC (rev 26069)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-10-26 15:17:02 UTC (rev 26070)
@@ -1111,4 +1111,8 @@
public MozillaTooltipListener getTooltipListener() {
return tooltipListener;
}
+
+ public IVpeToolBarManager getVpeToolBarManager() {
+ return vpeToolBarManager;
+ }
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java 2010-10-26 15:17:02 UTC (rev 26070)
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * 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.vpe.handlers;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.VpeEditorPart;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.toolbar.IVpeToolBarManager;
+import org.jboss.tools.vpe.editor.toolbar.VpeToolBarManager;
+import org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager;
+import org.jboss.tools.vpe.editor.toolbar.format.TextFormattingToolBar;
+
+/**
+ * Handler for ShowTextFormatting
+ */
+public class ShowTextFormattingHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ /**
+ * The constructor.
+ */
+ public ShowTextFormattingHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ boolean oldToggleState = HandlerUtil.toggleCommandState(event
+ .getCommand());
+ JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .setValue(IVpePreferencesPage.SHOW_TEXT_FORMATTING,
+ !oldToggleState);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ boolean toggleState = JspEditorPlugin.getDefault().getPreferenceStore()
+ .getBoolean(IVpePreferencesPage.SHOW_TEXT_FORMATTING);
+
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (!(activeEditor instanceof JSPMultiPageEditor)) {
+ return;
+ }
+
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ MozillaEditor mozillaEditor = ((VpeEditorPart) jspEditor
+ .getVisualEditor()).getVisualEditor();
+ IVpeToolBarManager vpeToolBarManager = mozillaEditor
+ .getVpeToolBarManager();
+
+ /*
+ * Update Text Formatting Bar
+ */
+ vpeToolBarManager.setToolbarVisibility(toggleState);
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
14 years, 1 month
JBoss Tools SVN: r26069 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor: form and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-10-26 11:01:22 -0400 (Tue, 26 Oct 2010)
New Revision: 26069
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleTreeForm.java
Log:
JBIDE-6180
https://jira.jboss.org/browse/JBIDE-6180
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java 2010-10-26 13:55:56 UTC (rev 26068)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java 2010-10-26 15:01:22 UTC (rev 26069)
@@ -41,6 +41,7 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IFileEditorInput;
@@ -128,7 +129,7 @@
this.form = mainContainer;
}
-
+
public void addErrorSelectionListener(ErrorSelectionListener listener) {
errorForm.addErrorSelectionListener(listener);
}
@@ -224,9 +225,20 @@
}
rightFormContainer.addForm(form);
form.setParent(rightFormContainer);
+ if(checkFocus()) {
+ setFocus();
+ }
}
}
+ boolean checkFocus() {
+ Control c = Display.getDefault().getFocusControl();
+ if(c == null) {
+ return true;
+ }
+ return false;
+ }
+
private IFormFactory getFormFactory(XModelObject selected) {
if(selected == null) return null;
XModelObjectFormFactory formFactory = null;
@@ -410,7 +422,11 @@
}
public void setFocus() {
- if(control != null && !control.isDisposed()) control.setFocus();
+ if(treeForm != null && treeForm.getControl() != null && !treeForm.getControl().isDisposed()) {
+ treeForm.setFocus();
+ } else {
+ if(control != null && !control.isDisposed()) control.setFocus();
+ }
}
public Object getAdapter(Class adapter) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleTreeForm.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleTreeForm.java 2010-10-26 13:55:56 UTC (rev 26068)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleTreeForm.java 2010-10-26 15:01:22 UTC (rev 26069)
@@ -53,6 +53,15 @@
createActionMapping();
}
+ public void setFocus() {
+ if(tree != null && tree.getViewer() != null) {
+ Control c = tree.getViewer().getControl();
+ if(c != null && !c.isDisposed()) {
+ c.setFocus();
+ }
+ }
+ }
+
public void dispose() {
super.dispose();
if (tree!=null) tree.dispose();
14 years, 1 month
JBoss Tools SVN: r26068 - in trunk/vpe/plugins/org.jboss.tools.vpe: icons and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-10-26 09:55:56 -0400 (Tue, 26 Oct 2010)
New Revision: 26068
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/icons/
trunk/vpe/plugins/org.jboss.tools.vpe/icons/border.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/bundle-as-el.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/non-visual-tags.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/point_to_css.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/preferences.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/refresh.gif
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_left.gif
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_top.gif
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_left.gif
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_top.gif
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
Log:
move some vpe toolbar buttons to external toolbar (https://jira.jboss.org/browse/JBIDE-4701)
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/border.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/border.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/bundle-as-el.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/bundle-as-el.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/non-visual-tags.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/non-visual-tags.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/point_to_css.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/point_to_css.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/preferences.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/preferences.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/refresh.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/refresh.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2010-10-26 12:45:27 UTC (rev 26067)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2010-10-26 13:55:56 UTC (rev 26068)
@@ -13,3 +13,12 @@
exportUserTagsTemplatesWizardDescription=Export User specified tag templates to the local file system
importUserTagsTemplatesWizardName=User specified tag templates
importUserTagsTemplatesWizardDescription=Import User specified tag templates from the local file system
+vpe.menu.name=Vpe Menu
+vpe.toolbar.preferences=Preferences
+vpe.toolbar.refresh=Refresh
+vpe.toolbar.page_design_options=Page Design Options
+vpe.toolbar.rotate_editors=Rotate Editors
+vpe.toolbar.show_border=Show border for unknown tags
+vpe.toolbar.show_non_visual_tags=Show non-visual tags
+vpe.toolbar.show_text_formatting=Show text formatting bar
+vpe.toolbar.show_bundle_as_el=Show bundle's messages as EL expressions
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-10-26 12:45:27 UTC (rev 26067)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-10-26 13:55:56 UTC (rev 26068)
@@ -59,6 +59,50 @@
<command categoryId="org.jboss.tools.vpe.category"
id="org.jboss.tools.vpe.jumping"
name="%visual.jumping"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.preferencesCommand"
+ name="%vpe.toolbar.preferences"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.refreshCommand"
+ name="%vpe.toolbar.refresh"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"
+ name="%vpe.toolbar.page_design_options"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.rotateEditorsCommand"
+ name="%vpe.toolbar.rotate_editors"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.showBorderCommand"
+ name="%vpe.toolbar.show_border">
+ <state
+ class="org.eclipse.ui.handlers.RegistryToggleState:false"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"
+ name="%vpe.toolbar.show_non_visual_tags">
+ <state
+ class="org.eclipse.ui.handlers.RegistryToggleState:false"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
+ <!--command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.showTextFormattingCommand"
+ name="%vpe.toolbar.show_text_formatting">
+ <state
+ class="org.eclipse.ui.handlers.RegistryToggleState:false"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command-->
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.showBundleAsELCommand"
+ name="%vpe.toolbar.show_bundle_as_el">
+ <state
+ class="org.eclipse.ui.handlers.RegistryToggleState:false"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
</extension>
<extension point="org.eclipse.ui.bindings">
<key commandId="org.jboss.tools.vpe.source.maxmin"
@@ -73,6 +117,46 @@
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
contextId="org.jboss.tools.vpe.editorContext"
sequence="M1+M2+Tab"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.preferencesCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+1"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.refreshCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+2"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+3"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.rotateEditorsCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+4"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.showBorderCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+5"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+6"/>
+ <!--key
+ commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+7"/-->
+ <key
+ commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+8"/>
</extension>
<extension
point="org.jboss.tools.jst.jsp.visulaEditorImplementations" id="org.jboss.tools.vpe.editor.VpeEditorPartFactory">
@@ -97,6 +181,138 @@
id="org.jboss.tools.vpe.editor.menu.SetupTemplateContributionItem">
</dynamic>
</menuContribution>
+ <menuContribution
+ locationURI="menu:sourceMenuId?after=org.jboss.tools.jst.jsp.menus.i18">
+ <menu
+ id="org.jboss.tools.vpe.menus.VpeMenu"
+ label="%vpe.menu.name"
+ mnemonic="M">
+ <command
+ commandId="org.jboss.tools.vpe.commands.preferencesCommand"
+ icon="icons/preferences.gif"
+ id="org.jboss.tools.vpe.menus.preferencesCommand"
+ mnemonic="S"/>
+ <command
+ commandId="org.jboss.tools.vpe.commands.refreshCommand"
+ icon="icons/refresh.gif"
+ id="org.jboss.tools.vpe.menus.refreshCommand"
+ mnemonic="S"/>
+ <command
+ commandId="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"
+ icon="icons/point_to_css.gif"
+ id="org.jboss.tools.vpe.menus.pageDesignOptionsCommand"
+ mnemonic="S"/>
+ <command
+ commandId="org.jboss.tools.vpe.commands.rotateEditorsCommand"
+ id="org.jboss.tools.vpe.menus.rotateEditorsCommand"
+ mnemonic="S"/>
+ <command
+ commandId="org.jboss.tools.vpe.commands.showBorderCommand"
+ icon="icons/border.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.menus.showBorderCommand"
+ mnemonic="S"/>
+ <command
+ commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"
+ icon="icons/non-visual-tags.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.menus.showNonVisualTagsCommand"
+ mnemonic="S"/>
+ <!--command
+ commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
+ icon="icons/text-formatting.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.menus.showTextFormattingCommand"
+ mnemonic="S"/-->
+ <command
+ commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
+ icon="icons/bundle-as-el.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.menus.showBundleAsELCommand"
+ mnemonic="S"/>
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ <menuContribution
+ locationURI="toolbar:org.jboss.tools.jst.jsp.toolbars.sampleToolbar?after=org.jboss.tools.jst.jsp.toolbars.i18">
+ <command
+ commandId="org.jboss.tools.vpe.commands.preferencesCommand"
+ icon="icons/preferences.gif"
+ id="org.jboss.tools.vpe.toolbars.preferencesCommand"
+ tooltip="%vpe.toolbar.preferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.vpe.commands.refreshCommand"
+ icon="icons/refresh.gif"
+ id="org.jboss.tools.vpe.toolbars.refreshCommand"
+ tooltip="%vpe.toolbar.refresh">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"
+ icon="icons/point_to_css.gif"
+ id="org.jboss.tools.vpe.toolbars.pageDesignOptionsCommand"
+ tooltip="%vpe.toolbar.page_design_options">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.vpe.commands.rotateEditorsCommand"
+ icon=""
+ id="org.jboss.tools.vpe.toolbars.rotateEditorsCommand">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.vpe.commands.showBorderCommand"
+ icon="icons/border.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.toolbars.showBorderCommand"
+ tooltip="%vpe.toolbar.show_border">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"
+ icon="icons/non-visual-tags.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.toolbars.showNonVisualTagsCommand"
+ tooltip="%vpe.toolbar.show_non_visual_tags">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <!--command
+ commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
+ icon="icons/text-formatting.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.toolbars.showTextFormattingCommand"
+ tooltip="%vpe.toolbar.show_text_formatting">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command-->
+ <command
+ commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
+ icon="icons/bundle-as-el.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.toolbars.showBundleAsELCommand"
+ tooltip="%vpe.toolbar.show_text_formatting">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
</extension>
<extension
point="org.eclipse.ui.menus">
@@ -144,6 +360,33 @@
</description>
</wizard>
</extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.jboss.tools.vpe.handlers.PreferencesHandler"
+ commandId="org.jboss.tools.vpe.commands.preferencesCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.RefreshHandler"
+ commandId="org.jboss.tools.vpe.commands.refreshCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.PageDesignOptionsHandler"
+ commandId="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.RotateEditorsHandler"
+ commandId="org.jboss.tools.vpe.commands.rotateEditorsCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.ShowBorderHandler"
+ commandId="org.jboss.tools.vpe.commands.showBorderCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.ShowNonVisualTagsHandler"
+ commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"/>
+ <!--handler
+ class="org.jboss.tools.vpe.handlers.ShowTextFormattingHandler"
+ commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"/-->
+ <handler
+ class="org.jboss.tools.vpe.handlers.ShowBundleAsELHandler"
+ commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"/>
+ </extension>
</plugin>
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_left.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_top.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_top.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_left.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_top.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_top.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java 2010-10-26 13:55:56 UTC (rev 26068)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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.vpe.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.ILocationProvider;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.util.FileUtil;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+import org.jboss.tools.vpe.resref.core.VpeResourcesDialog;
+
+/**
+ * Handler for PageDesignOptions
+ */
+public class PageDesignOptionsHandler extends AbstractHandler {
+ /**
+ * The constructor.
+ */
+ public PageDesignOptionsHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorPart activeEditor = HandlerUtil.getActiveEditorChecked(event);
+ IEditorInput input = activeEditor.getEditorInput();
+ Object fileLocation = null;
+ if (input instanceof IFileEditorInput) {
+ IFile file = ((IFileEditorInput) input).getFile();
+ fileLocation = file;
+ } else if (input instanceof ILocationProvider) {
+ ILocationProvider provider = (ILocationProvider) input;
+ IPath path = provider.getPath(input);
+ if (path != null) {
+ fileLocation = path;
+ }
+ }
+ if (null != fileLocation) {
+ VpeResourcesDialog dialogNew = new VpeResourcesDialog(PlatformUI
+ .getWorkbench().getDisplay().getActiveShell(), fileLocation);
+ dialogNew.open();
+ } else {
+ VpePlugin.getDefault().logError(
+ VpeUIMessages.COULD_NOT_OPEN_VPE_RESOURCES_DIALOG);
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorInput input = activeEditor.getEditorInput();
+ IFile file = null;
+ if (input instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) input).getFile();
+ } else if (input instanceof ILocationProvider) {
+ ILocationProvider provider = (ILocationProvider) input;
+ IPath path = provider.getPath(input);
+ if (path != null) {
+ file = FileUtil.getFile(input, path.lastSegment());
+ }
+ }
+ return ((file != null) && (file.exists()));
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java 2010-10-26 13:55:56 UTC (rev 26068)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.vpe.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage;
+
+/**
+ * Handler for Preferences
+ */
+public class PreferencesHandler extends AbstractHandler {
+ /**
+ * The constructor.
+ */
+ public PreferencesHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ VpeEditorPreferencesPage.openPreferenceDialog();
+ return null;
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java 2010-10-26 13:55:56 UTC (rev 26068)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.vpe.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+
+/**
+ * Handler for Refresh
+ */
+public class RefreshHandler extends AbstractHandler {
+ /**
+ * The constructor.
+ */
+ public RefreshHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorPart activeEditor = HandlerUtil.getActiveEditorChecked(event);
+ if (activeEditor instanceof JSPMultiPageEditor) {
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ jspEditor.getVisualEditor().getController().visualRefresh();
+ }
+ return null;
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java 2010-10-26 13:55:56 UTC (rev 26068)
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * 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.vpe.handlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+/**
+ * Handler for RotateEditors
+ */
+public class RotateEditorsHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ private static List<String> layoutValues;
+ private static Map<String, String> layoutIcons;
+ private static Map<String, String> layoutNames;
+ private static final String ICON_ORIENTATION_SOURCE_LEFT = "icons/source_left.gif"; //$NON-NLS-1$
+ private static final String ICON_ORIENTATION_SOURCE_TOP = "icons/source_top.gif"; //$NON-NLS-1$
+ private static final String ICON_ORIENTATION_VISUAL_LEFT = "icons/visual_left.gif"; //$NON-NLS-1$
+ private static final String ICON_ORIENTATION_VISUAI_TOP = "icons/visual_top.gif"; //$NON-NLS-1$
+
+ static {
+ /*
+ * Values from <code>layoutValues</code> should correspond to the order
+ * when increasing the index of the array will cause the source editor
+ * rotation
+ */
+ layoutIcons = new HashMap<String, String>();
+ layoutIcons.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE,
+ ICON_ORIENTATION_SOURCE_LEFT);
+ layoutIcons.put(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE,
+ ICON_ORIENTATION_SOURCE_TOP);
+ layoutIcons.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE,
+ ICON_ORIENTATION_VISUAL_LEFT);
+ layoutIcons.put(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE,
+ ICON_ORIENTATION_VISUAI_TOP);
+
+ layoutNames = new HashMap<String, String>();
+ layoutNames.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE,
+ VpeUIMessages.SPLITTING_HORIZ_LEFT_SOURCE);
+ layoutNames.put(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE,
+ VpeUIMessages.SPLITTING_VERT_TOP_SOURCE);
+ layoutNames.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE,
+ VpeUIMessages.SPLITTING_HORIZ_LEFT_VISUAL);
+ layoutNames.put(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE,
+ VpeUIMessages.SPLITTING_VERT_TOP_VISUAL);
+
+ layoutValues = new ArrayList<String>();
+ layoutValues.add(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE);
+ layoutValues.add(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE);
+ layoutValues.add(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE);
+ layoutValues.add(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE);
+ }
+
+ /**
+ * The constructor.
+ */
+ public RotateEditorsHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ IPreferenceStore preferences = JspEditorPlugin.getDefault()
+ .getPreferenceStore();
+ String orientation = preferences
+ .getString(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
+ int currentOrientationIndex = layoutValues.indexOf(orientation);
+
+ /*
+ * Rotate editors orientation clockwise.
+ */
+ currentOrientationIndex++;
+ if (currentOrientationIndex >= layoutValues.size()) {
+ currentOrientationIndex = currentOrientationIndex
+ % layoutValues.size();
+ }
+
+ String newOrientation = layoutValues.get(currentOrientationIndex);
+ preferences.setValue(
+ IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING,
+ newOrientation);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ IPreferenceStore preferences = JspEditorPlugin.getDefault()
+ .getPreferenceStore();
+ String orientation = preferences
+ .getString(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
+ if (orientation.isEmpty()) {
+ orientation = IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE;
+ preferences.setValue(
+ IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING,
+ orientation);
+ }
+
+ /*
+ * Update icon and tooltip
+ */
+ element.setIcon(ImageDescriptor.createFromFile(this.getClass(),
+ layoutIcons.get(orientation)));
+ String orientationName = layoutNames.get(orientation);
+ element.setTooltip(orientationName);
+ element.setText(orientationName);
+
+ /*
+ * Call <code>filContainer()</code> from VpeEditorPart to redraw
+ * CustomSashForm with new layout.
+ */
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (activeEditor instanceof JSPMultiPageEditor) {
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ VpeController vpeController = (VpeController) jspEditor
+ .getVisualEditor().getController();
+ vpeController.getPageContext().getEditPart()
+ .fillContainer(true, orientation);
+ }
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java 2010-10-26 13:55:56 UTC (rev 26068)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * 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.vpe.handlers;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+
+/**
+ * Handler for ShowBorder
+ */
+public class ShowBorderHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ /**
+ * The constructor.
+ */
+ public ShowBorderHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ boolean oldToggleState = HandlerUtil.toggleCommandState(event
+ .getCommand());
+ JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .setValue(IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS,
+ !oldToggleState);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (!(activeEditor instanceof JSPMultiPageEditor)) {
+ return;
+ }
+
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ VpeController vpeController = (VpeController) jspEditor
+ .getVisualEditor().getController();
+
+ boolean toggleState = JspEditorPlugin.getDefault().getPreferenceStore()
+ .getBoolean(IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS);
+ /*
+ * Set new value to VpeVisualDomBuilder.
+ */
+ vpeController.getVisualBuilder().setShowBorderForUnknownTags(
+ toggleState);
+ /*
+ * Update VPE
+ */
+ vpeController.visualRefresh();
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java 2010-10-26 13:55:56 UTC (rev 26068)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * 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.vpe.handlers;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+
+/**
+ * Handler for ShowBundleAsEL
+ */
+public class ShowBundleAsELHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ /**
+ * The constructor.
+ */
+ public ShowBundleAsELHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ boolean oldToggleState = HandlerUtil.toggleCommandState(event
+ .getCommand());
+ JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .setValue(
+ IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL,
+ !oldToggleState);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (!(activeEditor instanceof JSPMultiPageEditor)) {
+ return;
+ }
+
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ VpeController vpeController = (VpeController) jspEditor
+ .getVisualEditor().getController();
+
+ boolean toggleState = JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .getBoolean(
+ IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL);
+
+ /*
+ * Update bundle messages.
+ */
+ vpeController.getPageContext().getBundle()
+ .updateShowBundleUsageAsEL(toggleState);
+ vpeController.visualRefresh();
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java 2010-10-26 13:55:56 UTC (rev 26068)
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * 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.vpe.handlers;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+
+/**
+ * Handler for ShowNonVisualTags
+ */
+public class ShowNonVisualTagsHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ /**
+ * The constructor.
+ */
+ public ShowNonVisualTagsHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ boolean oldToggleState = HandlerUtil.toggleCommandState(event
+ .getCommand());
+ JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .setValue(IVpePreferencesPage.SHOW_NON_VISUAL_TAGS,
+ !oldToggleState);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (!(activeEditor instanceof JSPMultiPageEditor)) {
+ return;
+ }
+
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ VpeController vpeController = (VpeController) jspEditor
+ .getVisualEditor().getController();
+
+ boolean toggleState = JspEditorPlugin.getDefault().getPreferenceStore()
+ .getBoolean(IVpePreferencesPage.SHOW_NON_VISUAL_TAGS);
+ /*
+ * Change flag
+ */
+ vpeController.getVisualBuilder().setShowInvisibleTags(toggleState);
+ /*
+ * Update VPE
+ */
+ vpeController.visualRefresh();
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
14 years, 1 month
JBoss Tools SVN: r26067 - trunk/jst/plugins/org.jboss.tools.jst.web.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-10-26 08:45:27 -0400 (Tue, 26 Oct 2010)
New Revision: 26067
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/plugin.properties
trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml
Log:
JBIDE-7405
https://jira.jboss.org/browse/JBIDE-7405
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/plugin.properties 2010-10-26 12:10:11 UTC (rev 26066)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/plugin.properties 2010-10-26 12:45:27 UTC (rev 26067)
@@ -2,3 +2,5 @@
# START NON-TRANSLATABLE
Bundle-Name.0 = Web
# END NON-TRANSLATABLE
+strutsProblemName=Verification Problem
+constraintProblemName=Constraint Problem
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml 2010-10-26 12:10:11 UTC (rev 26066)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml 2010-10-26 12:45:27 UTC (rev 26067)
@@ -301,4 +301,18 @@
resource="meta/options_general.xml" priority="1">
</contribution>
</extension>
+
+ <extension id="strutsmarker" name="%strutsProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+ <extension id="constraintsmarker" name="%constraintProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+
</plugin>
14 years, 1 month
JBoss Tools SVN: r26066 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-26 08:10:11 -0400 (Tue, 26 Oct 2010)
New Revision: 26066
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
[JBIDE-7411] removed static initialization to 'disabled' by dynamic initialization on behalf of url->type binding validity
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-26 12:08:16 UTC (rev 26065)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-26 12:10:11 UTC (rev 26066)
@@ -4,10 +4,12 @@
[JBIDE-7360] CloudTypeValidator now returns a warning instead of an error (wizard may be finished with an invalid url).
* src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java (addPages):
[JBIDE-7402] added MalformedURLException handling.
- * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java (bindCloudType):
- [JBIDE-7402] bound type label to converter state.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
+ (bindCloudType): [JBIDE-7402] bound type label to converter state.
(CloudNameValidator): [JBIDE-7402] corrected CloudNameValidator to ignore the name of the connection that's being edited
(bindName): [JBIDE-7402] corrected CloudNameValidator to ignore the name of the connection that's being edited
+ (createControl): [JBIDE-7411] removed static initialization to 'disabled' by dynamic initialization on behalf of url->type binding validity
+ (enableButtonOnUrlValidityChanges): [JBIDE-7411] removed static initialization to 'disabled' by dynamic initialization on behalf of url->type binding validity
* src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java
(getDeltaCloudType): [JBIDE-7402] added setup of type at instantiation time
(CloudConnectionModel): [JBIDE-7402] radded setup of type at instantiation time
14 years, 1 month
JBoss Tools SVN: r26065 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-26 08:08:16 -0400 (Tue, 26 Oct 2010)
New Revision: 26065
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-7411] removed static initialization to 'disabled' by dynamic initialization on behalf of url->type binding validity
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-26 11:40:07 UTC (rev 26064)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-26 12:08:16 UTC (rev 26065)
@@ -273,7 +273,7 @@
Label typeLabel = new Label(container, SWT.NULL);
typeLabel.setText(WizardMessages.getString(CLOUDTYPE_LABEL));
Label computedTypeLabel = new Label(container, SWT.NULL);
- Binding urlBinding = bindCloudType(dbc, urlText, computedTypeLabel);
+ Binding urlTypeBinding = bindCloudType(dbc, urlText, computedTypeLabel);
// username
Label usernameLabel = new Label(container, SWT.NULL);
@@ -299,8 +299,9 @@
// test button
final Button testButton = new Button(container, SWT.NULL);
testButton.setText(WizardMessages.getString(TESTBUTTON_LABEL));
- testButton.setEnabled(false);
- urlBinding.getValidationStatus().addValueChangeListener(enableButtonOnUrlValidityChanges(testButton));
+ boolean isUrlValid = ((IStatus) urlTypeBinding.getValidationStatus().getValue()).getSeverity() == IStatus.OK;
+ urlTypeBinding.getValidationStatus().addValueChangeListener(
+ enableButtonOnUrlValidityChanges(testButton, isUrlValid));
CredentialsTestAdapter credentialsTestAdapter = new CredentialsTestAdapter(usernameDecoration,
passwordDecoration);
@@ -403,9 +404,12 @@
*
* @param testButton
* the test button
+ * @param isUrlValid
* @return the i value change listener
*/
- private IValueChangeListener enableButtonOnUrlValidityChanges(final Button testButton) {
+ private IValueChangeListener enableButtonOnUrlValidityChanges(final Button testButton, boolean isUrlValid) {
+
+ testButton.setEnabled(isUrlValid);
return new IValueChangeListener() {
@Override
@@ -417,9 +421,11 @@
}
/**
- * Binds the given cloud type label to the given url text widget. Attaches a
- * listener to the url text widget Adds a validity decorator to the url text
- * widget.
+ * Binds the given url text widget to the model type property and uses a
+ * converter to transfer urls to cloud types. Furthermore it binds the given
+ * cloud type label to the result of this conversion. The binding returned
+ * is the binding that connects the url text widget to the cloud type
+ * property in the model.
*
* @param dbc
* the databinding context to use
@@ -436,21 +442,29 @@
updateStrategy.setConverter(urlToCloudTypeConverter);
updateStrategy.setBeforeSetValidator(new CloudTypeValidator());
- Binding binding = dbc.bindValue(
+ // bind url to cloud type in model
+ Binding urlTypeBinding = dbc.bindValue(
WidgetProperties.text(SWT.Modify).observe(urlText),
BeanProperties.value(CloudConnectionModel.PROPERTY_TYPE).observe(connectionModel),
updateStrategy,
new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
- // bind converter to delta cloud label
+ /*
+ * bind converter to delta cloud label.
+ *
+ * Cloud type cannot be fetched from the model since invalid url's don't
+ * get propagated to the model and no type update happens in this case.
+ * We could not show invalid urls in the label if we would get the type
+ * in the model.
+ */
IObservableValue cloudTypeObservable = urlToCloudTypeConverter.getCloudTypeObservable();
DeltaCloudTypeLabelAdapter cloudTypeAdapter =
new DeltaCloudTypeLabelAdapter((DeltaCloudType) cloudTypeObservable.getValue(), typeLabel);
cloudTypeObservable.addValueChangeListener(cloudTypeAdapter);
- ControlDecorationSupport.create(binding, SWT.LEFT | SWT.TOP);
+ ControlDecorationSupport.create(urlTypeBinding, SWT.LEFT | SWT.TOP);
- return binding;
+ return urlTypeBinding;
}
/**
14 years, 1 month
JBoss Tools SVN: r26064 - in trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test: .settings and 17 other directories.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2010-10-26 07:40:07 -0400 (Tue, 26 Oct 2010)
New Revision: 26064
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
Log:
Initial commit of Smooks SWTBot tests
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.smooks.ui.bot.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,8 @@
+#Tue Oct 19 12:13:26 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Test
+Bundle-SymbolicName: org.jboss.tools.smooks.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.smooks.ui.bot.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.apache.log4j;bundle-version="1.2.13",
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.junit3.headless;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.junit4.headless;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
+ org.eclipse.swtbot.go;bundle-version="2.0.0",
+ org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.jboss.tools.ui.bot.ext;bundle-version="1.0.0",
+ org.eclipse.zest.core;bundle-version="1.1.0",
+ org.eclipse.zest.layouts;bundle-version="1.1.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.smooks.ui.bot.tests.SmooksAllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.smooks.ui.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms256m -Xmx384m -XX:MaxPermSize=256M -Dosgi.bundles=reference:file:org.eclipse.equinox.simpleconfigurator_1.0.200.v20100503.jar@1:start,org.eclipse.equinox.transforms.xslt@1:start,org.jboss.tools.equinox.transforms.xslt@1:start"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,34 @@
+package org.smooks;
+
+import java.util.Date;
+
+public class Header {
+ private Date date;
+ private Long customerNumber;
+ private String customerName;
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public Long getCustomerNumber() {
+ return customerNumber;
+ }
+
+ public void setCustomerNumber(Long customerNumber) {
+ this.customerNumber = customerNumber;
+ }
+
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ public void setCustomerName(String customerName) {
+ this.customerName = customerName;
+ }
+
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,28 @@
+package org.smooks;
+
+import java.util.List;
+
+import org.smooks.Header;
+import org.smooks.OrderItem;
+
+public class Order {
+ private Header header;
+ private List<OrderItem> orderItems;
+
+ public Header getHeader() {
+ return header;
+ }
+
+ public void setHeader(Header header) {
+ this.header = header;
+ }
+
+ public List<OrderItem> getOrderItems() {
+ return orderItems;
+ }
+
+ public void setOrderItems(List<OrderItem> orderItems) {
+ this.orderItems = orderItems;
+ }
+
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,72 @@
+package org.smooks;
+
+public class OrderItem {
+ private long productId;
+ private Integer quantity;
+ private double price;
+
+ public long getProductId() {
+ return productId;
+ }
+
+ public void setProductId(long productId) {
+ this.productId = productId;
+ }
+
+ public Integer getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(Integer quantity) {
+ this.quantity = quantity;
+ }
+
+ public double getPrice() {
+ return price;
+ }
+
+ public void setPrice(double price) {
+ this.price = price;
+ }
+
+ public byte byteValue() {
+ return quantity.byteValue();
+ }
+
+ public int compareTo(Integer anotherInteger) {
+ return quantity.compareTo(anotherInteger);
+ }
+
+ public double doubleValue() {
+ return quantity.doubleValue();
+ }
+
+ public boolean equals(Object obj) {
+ return quantity.equals(obj);
+ }
+
+ public float floatValue() {
+ return quantity.floatValue();
+ }
+
+ public int hashCode() {
+ return quantity.hashCode();
+ }
+
+ public int intValue() {
+ return quantity.intValue();
+ }
+
+ public long longValue() {
+ return quantity.longValue();
+ }
+
+ public short shortValue() {
+ return quantity.shortValue();
+ }
+
+ public String toString() {
+ return quantity.toString();
+ }
+
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,18 @@
+<order>
+ <header>
+ <date>Wed Nov 15 13:45:28 EST 2006</date>
+ <customer number="123123">Joe</customer>
+ </header>
+ <order-items>
+ <order-item>
+ <product>111</product>
+ <quantity>2</quantity>
+ <price>8.90</price>
+ </order-item>
+ <order-item>
+ <product>222</product>
+ <quantity>7</quantity>
+ <price>5.20</price>
+ </order-item>
+ </order-items>
+</order>
\ No newline at end of file
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
+ debug="false">
+
+ <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <!--
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
+ -->
+ <param name="ConversionPattern"
+ value="(%C{1}.java:%L) - %m%n" />
+
+ </layout>
+ </appender>
+
+ <appender name="fileAppender" class="org.apache.log4j.FileAppender">
+ <param name="File" value="/tmp/debug.log" />
+ <param name="Append" value="false" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
+ </layout>
+ </appender>
+
+ <appender name="asyncAppender" class="org.apache.log4j.AsyncAppender">
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </appender>
+
+ <!-- don't log matchers, this is very high amount of chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.matchers">
+ <priority value="OFF" />
+ </category>
+
+ <!--
+ don't log widget notification events, this is moderately high chatter
+ -->
+ <category name="org.eclipse.swtbot.swt.finder.widgets">
+ <priority value="OFF" />
+ </category>
+
+ <!-- don't log finders, this is moderate chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.finders">
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot.swt.finder.keyboard">
+ <!-- set to a value higher than debug to turn on. -->
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot">
+ <priority value="ALL" />
+ </category>
+
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <priority value ="debug" />
+ <appender-ref ref="console" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,50 @@
+package org.jboss.tools.smooks.ui.bot.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.smooks.ui.bot.test"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,272 @@
+package org.jboss.tools.smooks.ui.bot.testcase;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.channels.FileChannel;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.smooks.ui.bot.test.Activator;
+import org.jboss.tools.smooks.ui.bot.tests.Project;
+import org.jboss.tools.smooks.ui.bot.tests.SmooksTest;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.helper.UserLibraryHelper;
+import org.jboss.tools.ui.bot.ext.types.EntityType;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.zest.SWTBotZestContextMenu;
+import org.jboss.tools.ui.bot.ext.zest.SWTBotZestGraph;
+import org.jboss.tools.ui.bot.ext.zest.SWTBotZestNode;
+import org.jboss.tools.ui.bot.ext.zest.SWTZestBot;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class SmooksProject extends SmooksTest {
+
+ boolean projectCreated = false;
+
+ /**
+ * Create Java Project as dependency for other tests
+ */
+ @Test
+ public void createProject() {
+ open.perspective(ActionItem.Perspective.JAVA.LABEL);
+
+ // Create Java Project
+ JavaProjectEntity projectEntity = new JavaProjectEntity();
+ projectEntity.setProjectName(Project.PROJECT_NAME);
+ eclipse.createJavaProject(projectEntity);
+
+ // Check if project is created
+ open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ projectExplorer.selectProject(Project.PROJECT_NAME);
+ assertTrue(eclipse.isProjectInPackageExplorer(Project.PROJECT_NAME));
+
+
+ projectCreated = true;
+ }
+
+
+ /**
+ * Defines smooks user library inside
+ */
+ @Test
+ public void defineSmooksUserLibrary() {
+
+ String[] jarList = UserLibraryHelper.getJarList(Project.SMOOKS_PATH
+ + "/lib");
+ UserLibraryHelper.addUserLibrary("smooks-1.2.4", jarList);
+
+ // Check if library is defined TODO
+ }
+
+ /**
+ * Add Smooks User Library to Smooks project classpath
+ */
+ @Test
+ public void addSmooksUserLibraryToProject() {
+
+ // Open Project Properties
+ open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ projectExplorer.selectProject(Project.PROJECT_NAME);
+ ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Properties");
+
+ // Add Library
+ eclipse.waitForShell("Properties for " + Project.PROJECT_NAME);
+ bot.tree().expandNode("Java Build Path").select();
+ bot.tabItem("Libraries").activate();
+ bot.button("Add Library...").click();
+ bot.list().select("User Library");
+ bot.clickButton(IDELabel.Button.NEXT);
+ bot.table().getTableItem(Project.SMOOKS_LIBNAME).check();
+ bot.clickButton(IDELabel.Button.FINISH);
+ bot.clickButton(IDELabel.Button.OK);
+ }
+
+ /**
+ * Ads java classes from resources for testing smoooks engine
+ */
+ @Test
+ public void addTestingJavaClasses() {
+
+ // Copy class files\
+ try {
+ copyFileFromResource(Project.PROJECT_NAME, "src", "org", "smooks",
+ "Header.java");
+ copyFileFromResource(Project.PROJECT_NAME, "src", "org", "smooks",
+ "OrderItem.java");
+ copyFileFromResource(Project.PROJECT_NAME, "src", "org", "smooks",
+ "Order.java");
+ } catch (IOException e) {
+ log.error(e.getStackTrace());
+ fail("Unable to copy smooks classes resources");
+ }
+
+ projectExplorer.selectProject(Project.PROJECT_NAME);
+ ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Refresh");
+
+ open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
+
+ // Check file existence
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src","org.smooks","Header.java"));
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src","org.smooks","OrderItem.java"));
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src","org.smooks","Order.java"));
+ }
+
+ @Test
+ public void addTestingXMLFiles() {
+ // Copy class files
+ try {
+ copyFileFromResource(Project.PROJECT_NAME, "xml", "order.xml");
+ } catch (IOException e) {
+ log.error(e.getStackTrace());
+ fail("Unable to copy smooks xml resources");
+ }
+
+ open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ projectExplorer.selectProject(Project.PROJECT_NAME);
+ ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Refresh");
+
+ open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
+
+ // Check file existence
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "xml","order.xml"));
+ }
+
+ @Test
+ public void createSmooksConfig() {
+ SWTBotView view = open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
+
+
+ eclipse.selectTreeLocation(view.bot(),Project.PROJECT_NAME,"src");
+ eclipse.createNew(EntityType.SMOOKS_CONFIG);
+
+ open.finish(bot.activeShell().bot());
+
+ // check file
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME, "src","smooks-config.xml"));
+ }
+
+
+ @Test
+ public void defineInputTask() {
+ //SWTGefBot gefBot = new SWTGefBot();
+ ///SWTBotGefEditor editor = gefBot.gefEditor("smooks-config.xml");
+
+ SWTZestBot zestBot = new SWTZestBot();
+ SWTBotZestGraph graph = zestBot.getZestGraph(0);
+
+ SWTBotZestNode node = graph.node("Input Task");
+ node.click();
+
+ bot.sleep(2000, "--------> Trying to click");
+
+ SWTBotZestContextMenu menu = node.contextMenu();
+ menu.clickMenu("Add Task","Java Mapping");
+
+ bot.sleep(2000, " Context menu on node clicke <------------");
+ graph.debugGraph();
+ bot.sleep(2000, " Check debug info");
+
+ // Select Order XML file
+ graph.node("Input Task").click();
+ bot.clickButton("Add");
+ bot.clickButton("Browse WorkSpace");
+ SWTBot shellBot = bot.shell("Select Files").bot();
+ eclipse.selectTreeLocation(shellBot, Project.PROJECT_NAME, "xml", "order.xml");
+ bot.clickButton(IDELabel.Button.OK);
+ bot.clickButton(IDELabel.Button.FINISH);
+ bot.activeEditor().save();
+
+ SWTBotEditor editor;
+ graph.connection(graph.node("Input Task"),graph.node("Java Mapping")).click();
+ bot.sleep(2000,"check if edge is clicked");
+ }
+
+
+ @Test
+ public void addJavaMapping() {
+
+ bot.sleep(1000);
+ SWTZestBot zestBot = new SWTZestBot();
+ SWTBotZestGraph graph = zestBot.getZestGraph(0);
+ graph.node("Java Mapping").click();
+ bot.sleep(2000, "Check java mapping");
+
+ bot.sleep(1000, "check widgets");
+ }
+
+ @Test
+ public void defineJavaMapping() {
+
+
+ }
+
+ @Test
+ public void removeProject() {
+
+ open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ // Action
+ projectExplorer.deleteProject(Project.PROJECT_NAME, true);
+ util.waitForNonIgnoredJobs();
+ // Check
+ assertFalse(eclipse.isProjectInPackageExplorer(Project.PROJECT_NAME));
+ }
+
+ private void copyFileFromResource(String project, String... path)
+ throws IOException {
+
+ StringBuilder inBuilder = new StringBuilder();
+ StringBuilder outBuilder = new StringBuilder();
+
+ inBuilder.append(FileLocator.toFileURL(
+ Platform.getBundle(Activator.PLUGIN_ID).getEntry("/"))
+ .getFile());
+ inBuilder.append("resource");
+
+ outBuilder.append(Platform.getLocation() + File.separator);
+ outBuilder.append(project);
+
+ for (int i = 0; i < path.length; i++) {
+ inBuilder.append(File.separator);
+ inBuilder.append(path[i]);
+
+ outBuilder.append(File.separator);
+ outBuilder.append(path[i]);
+
+ // Create folder if doesn't exist
+ if ((path.length > 1) && (i == (path.length - 2))) {
+ File folder = new File(outBuilder.toString());
+ folder.mkdirs();
+ log.info("Folder created: " + outBuilder.toString());
+ }
+ }
+
+ File in = new File(inBuilder.toString());
+ File out = new File(outBuilder.toString());
+
+ FileChannel inChannel = null;
+ FileChannel outChannel = null;
+
+ inChannel = new FileInputStream(in).getChannel();
+ outChannel = new FileOutputStream(out).getChannel();
+
+ inChannel.transferTo(0, inChannel.size(), outChannel);
+
+ if (inChannel != null)
+ inChannel.close();
+ if (outChannel != null)
+ outChannel.close();
+ log.info("In file: " + inBuilder.toString() + " -> Out file: "
+ + outBuilder.toString());
+ }
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,10 @@
+package org.jboss.tools.smooks.ui.bot.tests;
+
+public class Project {
+ // Smooks project
+ public static final String PROJECT_NAME = "smookstest1";
+ public static final String SMOOKS_PATH = "/home/jpeterka/lib/smooks-1.2.4";
+ public static final String SMOOKS_LIBNAME = "smooks-1.2.4";
+
+
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,23 @@
+package org.jboss.tools.smooks.ui.bot.tests;
+
+import org.jboss.tools.smooks.ui.bot.testcase.SmooksProject;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(Suite.class)
+@SuiteClasses( {SmooksProject.class})
+public class SmooksAllTests extends SmooksTest {
+
+ @BeforeClass
+ public static void setUpSuite() {
+ SmooksTest.prepare();
+ }
+
+ @AfterClass
+ public static void tearDownSuite() {
+ SmooksTest.clean();
+ }
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java 2010-10-26 11:40:07 UTC (rev 26064)
@@ -0,0 +1,17 @@
+package org.jboss.tools.smooks.ui.bot.tests;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+
+
+public class SmooksTest extends SWTTestExt {
+
+ public static void prepare() {
+
+ eclipse.maximizeActiveShell();
+ bot.viewByTitle("Welcome").close();
+ }
+
+ public static void clean() {
+ bot.sleep(10000, "All Finished");
+ }
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 1 month
JBoss Tools SVN: r26063 - in trunk/as/plugins: org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-10-26 07:01:32 -0400 (Tue, 26 Oct 2010)
New Revision: 26063
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-7412 - rse support for deploy only server
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2010-10-26 10:40:19 UTC (rev 26062)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2010-10-26 11:01:32 UTC (rev 26063)
@@ -105,6 +105,7 @@
* @return
*/
protected IPath getDeployPath(IModule[] moduleTree, IDeployableServer server) {
+ String s = publishMethod.getPublishDefaultRootFolder(server.getServer());
String folder = PublishUtil.getDeployRootFolder(
moduleTree, server,
publishMethod.getPublishDefaultRootFolder(server.getServer()),
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-10-26 10:40:19 UTC (rev 26062)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-10-26 11:01:32 UTC (rev 26063)
@@ -136,8 +136,8 @@
protected void loadRemoteDeploymentDetails() throws CoreException{
String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
- JBossServer jbs = ServerConverter.getJBossServer(behaviour.getServer());
- this.remoteRootFolder = new Path(RSEUtils.getDeployRootFolder(jbs));
+ IDeployableServer ds = ServerConverter.getDeployableServer(behaviour.getServer());
+ this.remoteRootFolder = new Path(RSEUtils.getDeployRootFolder(ds));
IHost host = RSEUtils.findHost(connectionName);
if( host != null ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-10-26 10:40:19 UTC (rev 26062)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-10-26 11:01:32 UTC (rev 26063)
@@ -17,6 +17,7 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerAttributes;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -47,7 +48,7 @@
return server.getAttribute(RSEUtils.RSE_SERVER_CONFIG, runtime.getJBossConfiguration());
}
- public static String getDeployRootFolder(JBossServer server) {
+ public static String getDeployRootFolder(IDeployableServer server) {
return getDeployRootFolder(server.getServer(), server.getDeployLocationType());
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-10-26 10:40:19 UTC (rev 26062)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-10-26 11:01:32 UTC (rev 26063)
@@ -54,8 +54,10 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.IProgressService;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.IConstants;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.rse.core.RSEPublishMethod;
import org.jboss.ide.eclipse.as.rse.core.RSEUtils;
import org.jboss.ide.eclipse.as.ui.UIUtil;
@@ -101,52 +103,56 @@
};
combo.getCombo().addModifyListener(comboMListener);
- Label serverHomeLabel = new Label(this, SWT.NONE);
- serverHomeLabel.setText("Remote Server Home: ");
- rseBrowse = new Button(this, SWT.DEFAULT);
- rseBrowse.setText("Browse...");
- rseBrowse.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, null, 0, 100, -5));
- rseBrowse.addSelectionListener(new SelectionListener(){
- public void widgetSelected(SelectionEvent e) {
- browseClicked();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- browseClicked();
- }
- });
- rseServerHome = new Text(this, SWT.SINGLE | SWT.BORDER);
- serverHomeLabel.setLayoutData(UIUtil.createFormData2(child, 7, null, 0, 0, 10, null, 0));
- rseServerHome.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, serverHomeLabel, 5, rseBrowse, -5));
- rseServerHome.setText(callback.getServer().getAttribute(RSEUtils.RSE_SERVER_HOME_DIR,
- getRuntime().getRuntime().getLocation().toString()));
- rseServerHome.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- serverHomeChanged();
- }});
+ IServer original = callback.getServer().getOriginal();
+ if( original != null && ServerConverter.getJBossServer(original) != null ) {
- Label serverConfigLabel = new Label(this, SWT.NONE);
- serverConfigLabel.setText("Remote Server Configuration: ");
- rseServerConfig= new Text(this, SWT.SINGLE | SWT.BORDER);
- serverConfigLabel.setLayoutData(UIUtil.createFormData2(rseServerHome, 7, null, 0, 0, 10, null, 0));
- rseServerConfig.setText(callback.getServer().getAttribute(RSEUtils.RSE_SERVER_CONFIG,
- getRuntime().getJBossConfiguration()));
- rseServerConfig.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- serverConfigChanged();
- }});
- callback.getServer().addPropertyChangeListener(this);
-
- rseTest = new Button(this, SWT.NONE);
- rseTest.setText("Test...");
- rseTest.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0, null, 0, 100, -5));
- rseServerConfig.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0, serverConfigLabel, 5, rseTest, -5));
- rseTest.addSelectionListener(new SelectionListener(){
- public void widgetSelected(SelectionEvent e) {
- testPressed();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
+ Label serverHomeLabel = new Label(this, SWT.NONE);
+ serverHomeLabel.setText("Remote Server Home: ");
+ rseBrowse = new Button(this, SWT.DEFAULT);
+ rseBrowse.setText("Browse...");
+ rseBrowse.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, null, 0, 100, -5));
+ rseBrowse.addSelectionListener(new SelectionListener(){
+ public void widgetSelected(SelectionEvent e) {
+ browseClicked();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ browseClicked();
+ }
+ });
+ rseServerHome = new Text(this, SWT.SINGLE | SWT.BORDER);
+ serverHomeLabel.setLayoutData(UIUtil.createFormData2(child, 7, null, 0, 0, 10, null, 0));
+ rseServerHome.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, serverHomeLabel, 5, rseBrowse, -5));
+ rseServerHome.setText(callback.getServer().getAttribute(RSEUtils.RSE_SERVER_HOME_DIR,
+ getRuntime() == null ? "" : getRuntime().getRuntime().getLocation().toString()));
+ rseServerHome.addModifyListener(new ModifyListener(){
+ public void modifyText(ModifyEvent e) {
+ serverHomeChanged();
+ }});
+
+ Label serverConfigLabel = new Label(this, SWT.NONE);
+ serverConfigLabel.setText("Remote Server Configuration: ");
+ rseServerConfig= new Text(this, SWT.SINGLE | SWT.BORDER);
+ serverConfigLabel.setLayoutData(UIUtil.createFormData2(rseServerHome, 7, null, 0, 0, 10, null, 0));
+ rseServerConfig.setText(callback.getServer().getAttribute(RSEUtils.RSE_SERVER_CONFIG,
+ getRuntime() == null ? "" : getRuntime().getJBossConfiguration()));
+ rseServerConfig.addModifyListener(new ModifyListener(){
+ public void modifyText(ModifyEvent e) {
+ serverConfigChanged();
+ }});
+ callback.getServer().addPropertyChangeListener(this);
+
+ rseTest = new Button(this, SWT.NONE);
+ rseTest.setText("Test...");
+ rseTest.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0, null, 0, 100, -5));
+ rseServerConfig.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0, serverConfigLabel, 5, rseTest, -5));
+ rseTest.addSelectionListener(new SelectionListener(){
+ public void widgetSelected(SelectionEvent e) {
+ testPressed();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
}
private void testPressed(){
@@ -319,7 +325,8 @@
protected void serverHomeChanged() {
if( !updatingFromModelChange) {
callback.execute(new ChangeServerPropertyCommand(
- callback.getServer(), RSEUtils.RSE_SERVER_HOME_DIR, rseServerHome.getText(), getRuntime().getRuntime().getLocation().toString(),
+ callback.getServer(), RSEUtils.RSE_SERVER_HOME_DIR, rseServerHome.getText(),
+ getRuntime() == null ? "" : getRuntime().getRuntime().getLocation().toString(),
"Change RSE Server's Home Directory"));
}
}
@@ -327,7 +334,8 @@
protected void serverConfigChanged() {
if( !updatingFromModelChange ) {
callback.execute(new ChangeServerPropertyCommand(
- callback.getServer(), RSEUtils.RSE_SERVER_CONFIG, rseServerConfig.getText(), getRuntime().getJBossConfiguration(),
+ callback.getServer(), RSEUtils.RSE_SERVER_CONFIG, rseServerConfig.getText(),
+ getRuntime() == null ? "" : getRuntime().getJBossConfiguration(),
"Change RSE Server's Configuration"));
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-10-26 10:40:19 UTC (rev 26062)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-10-26 11:01:32 UTC (rev 26063)
@@ -754,9 +754,11 @@
public void updateListeners() {
// server has been saved. Remove property change listener from last wc and add to newest
- lastWC.removePropertyChangeListener(this);
+ if( lastWC != null )
+ lastWC.removePropertyChangeListener(this);
lastWC = page.getServer();
- lastWC.addPropertyChangeListener(this);
+ if( lastWC != null )
+ lastWC.addPropertyChangeListener(this);
}
public void propertyChange(PropertyChangeEvent evt) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-10-26 10:40:19 UTC (rev 26062)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-10-26 11:01:32 UTC (rev 26063)
@@ -169,7 +169,7 @@
id="org.jboss.ide.eclipse.as.ui.editor.serverModeSection"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="9"
- typeIds="%AllJBossServerTypes"/>
+ typeIds="%AllJBTServerTypes"/>
</extension>
14 years, 1 month