JBoss Tools SVN: r38265 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test: src/org/jboss/tools/ws/ui/bot/test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-30 06:35:27 -0500 (Mon, 30 Jan 2012)
New Revision: 38265
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulSupportTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt
Log:
Fixing the WS bot tests
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-01-30 09:48:41 UTC (rev 38264)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-01-30 11:35:27 UTC (rev 38265)
@@ -75,7 +75,7 @@
public void cleanup() {
servers.removeAllProjectsFromServer();
}
-
+
protected Slider_Level getLevel() {
return level;
}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java 2012-01-30 09:48:41 UTC (rev 38264)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulExplorerTest.java 2012-01-30 11:35:27 UTC (rev 38265)
@@ -12,6 +12,7 @@
package org.jboss.tools.ws.ui.bot.test.rest.explorer;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ws.ui.bot.test.rest.RESTFulAnnotations;
import org.jboss.tools.ws.ui.bot.test.rest.RESTfulTestBase;
import org.jboss.tools.ws.ui.bot.test.ti.wizard.RESTFullExplorerWizard;
@@ -27,6 +28,12 @@
private RESTFullExplorerWizard restfulWizard = null;
+ private final String BASIC_WS_RESOURCE_PATH = "/resources/restful/BasicRestfulWS.java.ws";
+
+ private final String ADVANCED_WS_RESOURCE_PATH = "/resources/restful/AdvancedRestfulWS.java.ws";
+
+ private final String EMPTY_WS_RESOURCE_PATH = "/resources/restful/EmptyRestfulWS.java.ws";
+
protected String getWsProjectName() {
return "RestServicesExplorer";
}
@@ -53,26 +60,22 @@
}
}
- @Override
- public void cleanup() {
- if (projectExists(getWsProjectName())) {
- removeRestSupport(getWsProjectName());
- }
- }
-
@Test
public void testAddingSimpleRESTMethods() {
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/BasicRestfulWS.java.ws"),
+ getResourceAsStream(BASIC_WS_RESOURCE_PATH),
false, getWsPackage(), getWsName());
-
+
+ bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
- assertTrue(restServices.length == 4);
- assertTrue(allRestServicesArePresent(restServices));
+ assertTrue(restServices.length + " RESTful services was found instead of 4.",
+ restServices.length == 4);
+ assertTrue("All RESTful services (GET, DELETE, POST, PUT) should be present but they are not",
+ allRestServicesArePresent(restServices));
for (SWTBotTreeItem restService : restServices) {
assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest"));
@@ -86,14 +89,17 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/AdvancedRestfulWS.java.ws"),
+ getResourceAsStream(ADVANCED_WS_RESOURCE_PATH),
false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
- assertTrue(restServices.length == 4);
- assertTrue(allRestServicesArePresent(restServices));
+ assertTrue(restServices.length + " RESTful services was found instead of 4.",
+ restServices.length == 4);
+ assertTrue("All RESTful services (GET, DELETE, POST, PUT) should be present but they are not",
+ allRestServicesArePresent(restServices));
for (SWTBotTreeItem restService : restServices) {
if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.GET.getLabel())) {
@@ -125,20 +131,24 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/BasicRestfulWS.java.ws"),
+ getResourceAsStream(BASIC_WS_RESOURCE_PATH),
false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
- assertTrue(allRestServicesArePresent(restServices));
+ assertTrue("All RESTful services (GET, DELETE, POST, PUT) should be present but they are not",
+ allRestServicesArePresent(restServices));
resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(), "@DELETE", "@GET");
+ bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
restServices = restfulWizard.getAllRestServices();
- assertFalse(allRestServicesArePresent(restServices));
+ assertFalse("All RESTful services (GET, DELETE, POST, PUT) shouldnt be present but they are",
+ allRestServicesArePresent(restServices));
for (SWTBotTreeItem restService : restServices) {
if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.DELETE.getLabel())) {
@@ -153,9 +163,10 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/AdvancedRestfulWS.java.ws"),
+ getResourceAsStream(ADVANCED_WS_RESOURCE_PATH),
false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
@@ -170,6 +181,7 @@
resourceHelper.replaceInEditor(bot.activeEditor().toTextEditor(), "@DELETE",
"@DELETE" + LINE_SEPARATOR + "@Produces(\"text/plain\")");
+ bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
restServices = restfulWizard.getAllRestServices();
@@ -186,23 +198,27 @@
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/BasicRestfulWS.java.ws"),
+ getResourceAsStream(BASIC_WS_RESOURCE_PATH),
false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
- assertTrue(restServices.length == 4);
+ assertTrue(restServices.length + " RESTful services was found instead of 4.",
+ restServices.length == 4);
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/EmptyRestfulWS.java.ws"),
+ getResourceAsStream(EMPTY_WS_RESOURCE_PATH),
false, getWsPackage(), getWsName());
+ bot.sleep(Timing.time2S());
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
restServices = restfulWizard.getAllRestServices();
- assertTrue(restServices.length == 0);
+ assertTrue(restServices.length + " RESTful services was found instead of 0.",
+ restServices.length == 0);
}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulSupportTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulSupportTest.java 2012-01-30 09:48:41 UTC (rev 38264)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/explorer/RESTfulSupportTest.java 2012-01-30 11:35:27 UTC (rev 38265)
@@ -43,7 +43,7 @@
@Test
- public void testJAXRSExplorerSupport() {
+ public void test_JAXRS_ExplorerSupport() {
addRestSupport(getWsProjectName());
assertTrue(isRestSupportEnabled(getWsProjectName()));
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt 2012-01-30 09:48:41 UTC (rev 38264)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt 2012-01-30 11:35:27 UTC (rev 38265)
@@ -1,3 +1 @@
-* manually add resteasy libs to project with EAP target server (RESTfulTestBase)
-* enable/disable JAX-RS validator (RESTfulTestBase)
-* test operating on JAX-RS completion
\ No newline at end of file
+* manually add resteasy libs to project with EAP target server (RESTfulTestBase)
\ No newline at end of file
12 years, 11 months
JBoss Tools SVN: r38264 - in trunk: tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-01-30 04:48:41 -0500 (Mon, 30 Jan 2012)
New Revision: 38264
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/seam/CreateSeamPortletProject.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
Log:
Seam 2 label changed just to Seam (following the change in trunk)
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/seam/CreateSeamPortletProject.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/seam/CreateSeamPortletProject.java 2012-01-30 09:29:32 UTC (rev 38263)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/seam/CreateSeamPortletProject.java 2012-01-30 09:48:41 UTC (rev 38264)
@@ -43,7 +43,7 @@
List<FacetDefinition> facets = new ArrayList<FacetDefinition>();
facets.add(JAVA_FACET);
facets.add(JSF_FACET);
- facets.add(new FacetDefinition("Seam 2", null, configuredState.getSeam().version));
+ facets.add(new FacetDefinition("Seam", null, configuredState.getSeam().version));
facets.add(CORE_PORTLET_FACET);
facets.add(JSF_PORTLET_FACET);
facets.add(SEAM_PORTLET_FACET);
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2012-01-30 09:29:32 UTC (rev 38263)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2012-01-30 09:48:41 UTC (rev 38264)
@@ -8980,7 +8980,7 @@
* represents item : JBoss Tools->Web->Seam
*/
public static final IPreference LABEL = new IPreference() {
- public String getName() { return "Seam 2";}
+ public String getName() { return "Seam";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("JBoss Tools");
12 years, 11 months
JBoss Tools SVN: r38263 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-30 04:29:32 -0500 (Mon, 30 Jan 2012)
New Revision: 38263
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/commands/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/commands/CopyPropertyCommandHandler.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java
Log:
[JBIDE-10724] adding copy command to context menu
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-01-30 09:02:53 UTC (rev 38262)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-01-30 09:29:32 UTC (rev 38263)
@@ -274,8 +274,8 @@
<extension
point="org.eclipse.ui.commands">
<command
- id="org.jboss.tools.openshift.express.internal.ui.CopyCommand"
- name="New Bookmarks Folder">
+ id="org.jboss.tools.openshift.express.internal.ui.commands.CopyPropertyCommand"
+ name="Copy property command">
</command>
</extension>
<extension
@@ -283,11 +283,18 @@
<menuContribution
locationURI="popup:org.jboss.tools.openshift.express.internal.ui.wizard.ApplicationDetailsDialog">
<command
- commandId="org.jboss.tools.openshift.express.internal.ui.CopyCommand"
+ commandId="org.jboss.tools.openshift.express.internal.ui.commands.CopyPropertyCommand"
icon="icons/copy_edit_co.gif"
label="Copy"
style="push">
</command>
</menuContribution>
- </extension>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.jboss.tools.openshift.express.internal.ui.commands.CopyPropertyCommandHandler"
+ commandId="org.jboss.tools.openshift.express.internal.ui.commands.CopyPropertyCommand">
+ </handler>
+ </extension>
</plugin>
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/commands/CopyPropertyCommandHandler.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/commands/CopyPropertyCommandHandler.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/commands/CopyPropertyCommandHandler.java 2012-01-30 09:29:32 UTC (rev 38263)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.openshift.express.internal.ui.propertytable.IProperty;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class CopyPropertyCommandHandler extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelectionChecked(event);
+ if (selection instanceof StructuredSelection) {
+ Object selectedElement = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedElement instanceof IProperty) {
+ IProperty selectedProperty = (IProperty) selectedElement;
+ copyToClipboard(selectedProperty, event);
+ }
+
+ }
+ return null;
+ }
+
+ private void copyToClipboard(IProperty selectedProperty, ExecutionEvent event) {
+ TextTransfer textTransfer = TextTransfer.getInstance();
+ Clipboard clipboard = new Clipboard(HandlerUtil.getActiveShell(event).getDisplay());
+ clipboard.setContents(
+ new Object[] { selectedProperty.getValue() },
+ new Transfer[] { textTransfer });
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/commands/CopyPropertyCommandHandler.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java 2012-01-30 09:02:53 UTC (rev 38262)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java 2012-01-30 09:29:32 UTC (rev 38263)
@@ -41,7 +41,8 @@
*/
public class ApplicationDetailsDialog extends TitleAreaDialog {
- private static final String CONTEXT_MENU = "popup:org.jboss.tools.openshift.express.internal.ui.wizard.ApplicationDetailsDialog";
+ private static final String CONTEXT_MENU_ID = "popup:org.jboss.tools.openshift.express.internal.ui.wizard.ApplicationDetailsDialog";
+
private IApplication application;
public ApplicationDetailsDialog(IApplication application, Shell parentShell) {
@@ -68,8 +69,7 @@
GridLayoutFactory.fillDefaults().margins(10, 10).applyTo(dialogArea);
TreeViewer viewer = createApplicationDetailsTable(dialogArea);
fillApplicationDetailsTable(viewer);
- IMenuManager contextMenu = UIUtils.createContextMenu(viewer.getControl());
- UIUtils.registerContributionManager(CONTEXT_MENU, contextMenu, viewer.getControl());
+ createContextMenu(viewer);
Label buttonsSeparator = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR);
GridDataFactory.fillDefaults()
@@ -78,6 +78,11 @@
return dialogArea;
}
+ private void createContextMenu(TreeViewer viewer) {
+ IMenuManager contextMenu = UIUtils.createContextMenu(viewer.getControl());
+ UIUtils.registerContributionManager(CONTEXT_MENU_ID, contextMenu, viewer.getControl());
+ }
+
private void fillApplicationDetailsTable(final TreeViewer viewer) {
viewer.setInput(application);
viewer.expandToLevel(2);
12 years, 11 months
JBoss Tools SVN: r38262 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: icons and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-30 04:02:53 -0500 (Mon, 30 Jan 2012)
New Revision: 38262
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/copy_edit_co.gif
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/UIUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java
Log:
[JBIDE-10724] adding copy command to context menu
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/copy_edit_co.gif
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/copy_edit_co.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-01-30 08:56:39 UTC (rev 38261)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-01-30 09:02:53 UTC (rev 38262)
@@ -270,5 +270,24 @@
id="org.jboss.tools.openshift.express.ui.server.fragment"
typeIds="org.jboss.tools.openshift.express.openshift.server.type">
</fragment>
- </extension>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.jboss.tools.openshift.express.internal.ui.CopyCommand"
+ name="New Bookmarks Folder">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:org.jboss.tools.openshift.express.internal.ui.wizard.ApplicationDetailsDialog">
+ <command
+ commandId="org.jboss.tools.openshift.express.internal.ui.CopyCommand"
+ icon="icons/copy_edit_co.gif"
+ label="Copy"
+ style="push">
+ </command>
+ </menuContribution>
+ </extension>
</plugin>
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/UIUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/UIUtils.java 2012-01-30 08:56:39 UTC (rev 38261)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/UIUtils.java 2012-01-30 09:02:53 UTC (rev 38262)
@@ -10,9 +10,22 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.utils;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.ContributionManager;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.menus.IMenuService;
/**
* @author André Dietisheim
@@ -30,4 +43,53 @@
}
+ /**
+ * Register a {@link ContributionManager}. The contribution manager gets unregistered on control disposal
+ *
+ * @param id the id
+ * @param contributionManager the contribution manager
+ * @param control the control
+ *
+ * @see ContributionManager
+ * @see IMenuService
+ * @see DisposeListener
+ */
+ public static void registerContributionManager( final String id, final IContributionManager contributionManager,
+ final Control control )
+ {
+ Assert.isNotNull( id );
+ Assert.isNotNull( contributionManager );
+ Assert.isTrue( control != null && !control.isDisposed() );
+
+ final IMenuService menuService = ( IMenuService ) PlatformUI.getWorkbench().getService( IMenuService.class );
+ menuService.populateContributionManager( ( ContributionManager ) contributionManager, id );
+ contributionManager.update( true );
+ control.addDisposeListener( new DisposeListener()
+ {
+ public void widgetDisposed( DisposeEvent e )
+ {
+ menuService.releaseContributions( ( ContributionManager ) contributionManager );
+ }
+ } );
+ }
+
+ /**
+ * Creates context menu to a given control.
+ *
+ * @param control the control
+ *
+ * @return the i menu manager
+ */
+ public static IMenuManager createContextMenu( final Control control )
+ {
+ Assert.isTrue( control != null && !control.isDisposed() );
+
+ MenuManager menuManager = new MenuManager();
+ menuManager.add( new GroupMarker( IWorkbenchActionConstants.MB_ADDITIONS ) );
+
+ Menu menu = menuManager.createContextMenu( control );
+ control.setMenu( menu );
+ return menuManager;
+ }
+
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java 2012-01-30 08:56:39 UTC (rev 38261)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java 2012-01-30 09:02:53 UTC (rev 38262)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
+import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.layout.GridDataFactory;
@@ -30,6 +31,7 @@
import org.jboss.tools.openshift.express.internal.ui.OpenShiftImages;
import org.jboss.tools.openshift.express.internal.ui.propertytable.PropertyNameCellLabelProvider;
import org.jboss.tools.openshift.express.internal.ui.propertytable.PropertyValueCellLabelProvider;
+import org.jboss.tools.openshift.express.internal.ui.utils.UIUtils;
import com.openshift.express.client.IApplication;
@@ -39,6 +41,7 @@
*/
public class ApplicationDetailsDialog extends TitleAreaDialog {
+ private static final String CONTEXT_MENU = "popup:org.jboss.tools.openshift.express.internal.ui.wizard.ApplicationDetailsDialog";
private IApplication application;
public ApplicationDetailsDialog(IApplication application, Shell parentShell) {
@@ -65,7 +68,9 @@
GridLayoutFactory.fillDefaults().margins(10, 10).applyTo(dialogArea);
TreeViewer viewer = createApplicationDetailsTable(dialogArea);
fillApplicationDetailsTable(viewer);
-
+ IMenuManager contextMenu = UIUtils.createContextMenu(viewer.getControl());
+ UIUtils.registerContributionManager(CONTEXT_MENU, contextMenu, viewer.getControl());
+
Label buttonsSeparator = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR);
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.TOP).grab(true, false).applyTo(buttonsSeparator);
12 years, 11 months
JBoss Tools SVN: r38261 - in trunk/maven: tests/org.jboss.tools.maven.configurators.tests/projects/jsf and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-01-30 03:56:39 -0500 (Mon, 30 Jan 2012)
New Revision: 38261
Added:
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jsf/JBDS-1999/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jsf/JBDS-1999/pom.xml
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JSFConfiguratorTest.java
Log:
JBDS-1999 : Don't create web.xml while looking for the faces servlet.
Modified: trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2012-01-30 07:15:34 UTC (rev 38260)
+++ trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2012-01-30 08:56:39 UTC (rev 38261)
@@ -24,6 +24,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -34,18 +35,13 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.j2ee.internal.web.util.WebArtifactEditUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
+import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
import org.eclipse.jst.j2ee.webapplication.Servlet;
import org.eclipse.jst.j2ee.webapplication.ServletType;
import org.eclipse.jst.j2ee.webapplication.WebApp;
import org.eclipse.jst.j2ee.webapplication.WebType;
-import org.eclipse.jst.jsf.core.JSFVersion;
import org.eclipse.jst.jsf.core.internal.project.facet.IJSFFacetInstallDataModelProperties;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFUtilFactory;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFUtils;
-import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigUtils;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
@@ -80,10 +76,6 @@
private static final String WAR_SOURCE_FOLDER = "/src/main/webapp";
- protected static final IProjectFacet dynamicWebFacet;
- protected static IProjectFacetVersion dynamicWebVersion;
- protected static final IProjectFacetVersion WEB_FACET_3_0;
-
public static final IProjectFacet JSF_FACET;
public static final IProjectFacetVersion JSF_FACET_VERSION_2_0;
public static final IProjectFacetVersion JSF_FACET_VERSION_1_2;
@@ -95,9 +87,6 @@
public static final String JSF_VERSION_1_1 = "1.1";
private static final String FACES_SERVLET = "javax.faces.webapp.FacesServlet";
static {
- dynamicWebFacet = ProjectFacetsManager.getProjectFacet("jst.web"); //$NON-NLS-1$
- dynamicWebVersion = dynamicWebFacet.getVersion("2.5"); //$NON-NLS-1$
- WEB_FACET_3_0 = dynamicWebFacet.getVersion("3.0"); //$NON-NLS-1$
JSF_FACET = ProjectFacetsManager.getProjectFacet("jst.jsf"); //$NON-NLS-1$
JSF_FACET_VERSION_2_0 = JSF_FACET.getVersion(JSF_VERSION_2_0);
JSF_FACET_VERSION_1_2 = JSF_FACET.getVersion(JSF_VERSION_1_2); //$NON-NLS-1$
@@ -180,7 +169,7 @@
String jsfVersion, MavenProject mavenProject,
IProgressMonitor monitor) throws CoreException {
- if (!fproj.hasProjectFacet(dynamicWebFacet)) {
+ if (!fproj.hasProjectFacet(IJ2EEFacetConstants.DYNAMIC_WEB_FACET)) {
Activator.log(Messages.JSFProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet);
} else {
installJSFFacet(fproj, jsfVersion, mavenProject, monitor);
@@ -339,12 +328,13 @@
return relative.replace('\\', '/'); //$NON-NLS-1$ //$NON-NLS-2$
}
+ /*
private boolean configureWebxml() {
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
return store.getBoolean(Activator.CONFIGURE_WEBXML_JSF20);
}
+ */
-
private String getJSFVersion(MavenProject mavenProject, IFacetedProject fproj) {
String version = null;
IProject project = fproj.getProject();
@@ -368,8 +358,8 @@
if (version == null && hasFacesServletInWebXml(project)) {
//No dependency on JSF, no faces-config, but uses faces-servlet
//so we try to best guess the version depending on the installed web facet
- IProjectFacetVersion webVersion = fproj.getInstalledVersion(dynamicWebFacet);
- if (webVersion.compareTo(WEB_FACET_3_0) < 0) {
+ IProjectFacetVersion webVersion = fproj.getInstalledVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET);
+ if (webVersion.compareTo(IJ2EEFacetConstants.DYNAMIC_WEB_30) < 0) {
version = JSF_VERSION_1_2;
} else {
version = JSF_VERSION_2_0;
@@ -387,6 +377,12 @@
if (component != null) {
edit = WebArtifactEdit.getWebArtifactEditForRead(component);
if (edit !=null) {
+ IPath webXmlPath = edit.getDeploymentDescriptorPath();
+ if (!ResourcesPlugin.getWorkspace().getRoot().getFile(webXmlPath).exists()) {
+ //JBDS-1999 : If web.xml doesn't exist and we call edit.getWebApp()
+ //it will be created, so we bail.
+ return false;
+ }
WebApp webapp = edit.getWebApp();
if (webapp != null && webapp.getServlets() != null) {
for (Object o : webapp.getServlets()) {
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jsf/JBDS-1999/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jsf/JBDS-1999/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jsf/JBDS-1999/pom.xml 2012-01-30 08:56:39 UTC (rev 38261)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools.maven.tests</groupId>
+ <artifactId>JBDS-1999</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>war</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JSFConfiguratorTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JSFConfiguratorTest.java 2012-01-30 07:15:34 UTC (rev 38260)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JSFConfiguratorTest.java 2012-01-30 08:56:39 UTC (rev 38261)
@@ -5,6 +5,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.m2e.tests.common.WorkspaceHelpers;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -105,6 +106,20 @@
assertIsJSFProject(jsfProject, JSFProjectConfigurator.JSF_FACET_VERSION_2_0);
}
+ @Test
+ public void testJBDS1999_noWebXmlCreated() throws Exception {
+ IProject project = importProject("projects/jsf/JBDS-1999/pom.xml");
+ waitForJobsToComplete();
+
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+ assertNotNull(project.getName() + " is not a faceted project", facetedProject);
+ assertFalse(project.getName() + " should not have the JSF facet", facetedProject.hasProjectFacet(JSFProjectConfigurator.JSF_FACET));
+ assertTrue(project.getName() + " doesn't have the expected Web facet", facetedProject.hasProjectFacet(IJ2EEFacetConstants.DYNAMIC_WEB_25));
+
+ IFile webXml = project.getFile("src/main/webapp/WEB-INF/web.xml");
+ assertFalse("web.xml was added to the project!", webXml.exists());
+ }
+
private void assertHasJSFConfigurationError(IProject project, String message) throws Exception {
WorkspaceHelpers.assertErrorMarker(MavenJSFConstants.JSF_CONFIGURATION_ERROR_MARKER_ID, message, 1, "", project);
}
12 years, 11 months
JBoss Tools SVN: r38260 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-01-30 02:15:34 -0500 (Mon, 30 Jan 2012)
New Revision: 38260
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/internal/FileUtils.java
Log:
internal utils missed a commit ?
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/internal/FileUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/internal/FileUtils.java 2012-01-30 01:31:56 UTC (rev 38259)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/internal/FileUtils.java 2012-01-30 07:15:34 UTC (rev 38260)
@@ -11,12 +11,18 @@
package org.jboss.ide.eclipse.as.core.util.internal;
import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
/**
* Various util methods that allow to read and write to files.
*
@@ -26,7 +32,6 @@
public class FileUtils {
private static final int BUFFER = 65536;
- private static byte[] buffer = new byte[BUFFER];
public static void writeTo(InputStream in, String fileName) throws IOException {
writeTo(in, new File(fileName));
@@ -45,10 +50,86 @@
}
public static void writeTo(InputStream in, OutputStream out) throws IOException {
+ byte[] buffer = new byte[BUFFER];
int avail = in.read(buffer);
while (avail > 0) {
out.write(buffer, 0, avail);
avail = in.read(buffer);
}
}
+
+ public static void setContents(File file, String contents) throws IOException, CoreException {
+ byte[] buffer = new byte[BUFFER];
+ InputStream in = new ByteArrayInputStream(contents.getBytes());
+ OutputStream out = null;
+ try {
+ out = new BufferedOutputStream(new FileOutputStream(file));
+ int avail = in.read(buffer);
+ while (avail > 0) {
+ out.write(buffer, 0, avail);
+ avail = in.read(buffer);
+ }
+ } finally {
+ if (out != null) {
+ out.close();
+ }
+ }
+ }
+
+ public static String getContents(IFile file) throws IOException, CoreException {
+ return getContents(file.getLocation().toFile());
+ }
+
+ public static String getContents(File aFile) throws IOException {
+ return new String(getBytesFromFile(aFile));
+ }
+
+ public static byte[] getBytesFromFile(File file) throws IOException {
+ InputStream is = new FileInputStream(file);
+ byte[] bytes = new byte[(int)file.length()];
+ int offset = 0;
+ int numRead = 0;
+ while (offset < bytes.length
+ && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
+ offset += numRead;
+ }
+ is.close();
+ return bytes;
+ }
+
+ public static void setContents(IFile file, int val) throws IOException , CoreException{
+ setContents(file, "" + val); //$NON-NLS-1$
+ }
+
+ public static void setContents(IFile file, String val) throws IOException , CoreException{
+ if( !file.exists())
+ file.create(new ByteArrayInputStream((val).getBytes()), false, null);
+ else
+ file.setContents(new ByteArrayInputStream((val).getBytes()), false, false, new NullProgressMonitor());
+ try {
+ Thread.sleep(2000);
+ } catch( InterruptedException ie) {}
+ //JobUtils.waitForIdle();
+ }
+
+ public static int countFiles(File root) {
+ int count = 0;
+ if( !root.isDirectory() )
+ return 1;
+ File[] children = root.listFiles();
+ for( int i = 0; i < children.length; i++ )
+ count += countFiles(children[i]);
+ return count;
+ }
+
+ public static int countAllResources(File root) {
+ int count = 0;
+ if( !root.isDirectory() )
+ return 1;
+ File[] children = root.listFiles();
+ for( int i = 0; i < children.length; i++ )
+ count += countAllResources(children[i]);
+ return 1 + count;
+ }
+
}
12 years, 11 months
JBoss Tools SVN: r38259 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-01-29 20:31:56 -0500 (Sun, 29 Jan 2012)
New Revision: 38259
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java
Log:
code cleanup, Exception catch block replaced to CoreException
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java 2012-01-29 23:10:38 UTC (rev 38258)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java 2012-01-30 01:31:56 UTC (rev 38259)
@@ -69,7 +69,7 @@
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage(), createdFile);
}
- }catch(Exception ex){
+ }catch(CoreException ex){
JSFModelPlugin.getPluginLog().logError(ex);
}
}
12 years, 11 months
JBoss Tools SVN: r38258 - in workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite: features and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-01-29 18:10:38 -0500 (Sun, 29 Jan 2012)
New Revision: 38258
Added:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.4.201201292308.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.4.201201292308.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.4.201201292308.jar
Removed:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.3.201201242105.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.3.201201242105.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.3.201201242105.jar
Modified:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/artifacts.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/content.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml
Log:
JBIDE-9309 Easily adding full JBoss AS source
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/artifacts.jar
===================================================================
(Binary files differ)
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/content.jar
===================================================================
(Binary files differ)
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.3.201201242105.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.4.201201292308.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.4.201201292308.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.3.201201242105.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.4.201201292308.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.4.201201292308.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.3.201201242105.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.4.201201292308.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.4.201201292308.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml
===================================================================
--- workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml 2012-01-28 01:04:53 UTC (rev 38257)
+++ workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml 2012-01-29 23:10:38 UTC (rev 38258)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.jboss.tools.as.sourcelookup.feature_1.0.3.201201242105.jar" id="org.jboss.tools.as.sourcelookup.feature" version="1.0.3.201201242105">
+ <feature url="features/org.jboss.tools.as.sourcelookup.feature_1.0.4.201201292308.jar" id="org.jboss.tools.as.sourcelookup.feature" version="1.0.4.201201292308">
<category name="org.jboss.tools.as.sourcelookup"/>
</feature>
<category-def name="org.jboss.tools.as.sourcelookup" label="JBoss Tools Source Lookup"/>
12 years, 11 months
JBoss Tools SVN: r38256 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: utils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-27 18:58:59 -0500 (Fri, 27 Jan 2012)
New Revision: 38256
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/AbstractPropertyCellLabelProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java
Log:
[JBIDE-10724] show styled text before link widget (tree editor) becomes visible
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/AbstractPropertyCellLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/AbstractPropertyCellLabelProvider.java 2012-01-27 21:25:20 UTC (rev 38255)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/AbstractPropertyCellLabelProvider.java 2012-01-27 23:58:59 UTC (rev 38256)
@@ -10,14 +10,14 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.propertytable;
-import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
import org.eclipse.jface.viewers.ViewerCell;
/**
* @author Xavier Coulon
* @author Andre Dietisheim
*/
-public abstract class AbstractPropertyCellLabelProvider extends CellLabelProvider {
+public abstract class AbstractPropertyCellLabelProvider extends StyledCellLabelProvider {
@Override
public void update(ViewerCell cell) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-27 21:25:20 UTC (rev 38255)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-27 23:58:59 UTC (rev 38256)
@@ -10,10 +10,12 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.propertytable;
+import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.graphics.TextStyle;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Tree;
import org.jboss.tools.common.ui.BrowserUtil;
@@ -28,6 +30,8 @@
protected void update(IProperty property, ViewerCell cell) {
if (property.isLink()) {
+ // tree editor takes some time to display, show text in the meantime
+ createStyledText(property, cell);
createLink(property, cell);
} else {
cell.setText(property.getValue());
@@ -39,10 +43,23 @@
link.setText("<a>" + property.getValue() + "</a>");
link.setBackground(cell.getBackground());
link.addMouseListener(onLinkClicked(property.getValue()));
-
+
TreeUtils.createTreeEditor(link, property.getValue(), cell);
}
+ private void createStyledText(IProperty property, final ViewerCell cell) {
+ StyledString.Styler style = new StyledString.Styler() {
+ @Override
+ public void applyStyles(TextStyle textStyle) {
+ textStyle.foreground = cell.getControl().getDisplay().getSystemColor(SWT.COLOR_BLUE);
+ textStyle.underline = true;
+ }
+ };
+ StyledString styledString = new StyledString(property.getValue(), style);
+ cell.setStyleRanges(styledString.getStyleRanges());
+ cell.setText(styledString.getString());
+ }
+
protected MouseAdapter onLinkClicked(final String url) {
return new MouseAdapter() {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java 2012-01-27 21:25:20 UTC (rev 38255)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java 2012-01-27 23:58:59 UTC (rev 38256)
@@ -66,12 +66,12 @@
{
treeEditor.grabHorizontal = true;
treeEditor.grabVertical = true;
- treeEditor.horizontalAlignment = SWT.CENTER;
- treeEditor.verticalAlignment = SWT.CENTER;
+ treeEditor.horizontalAlignment = SWT.FILL;
+ treeEditor.verticalAlignment = SWT.FILL;
TreeItem treeItem = ( TreeItem ) cell.getItem();
treeEditor.setEditor( control, treeItem, cell.getColumnIndex() );
// ensure cell is as large as space needed for link
- cell.setText( " " + cellText + " ");
+ //cell.setText( " " + cellText + " ");
}
/**
12 years, 11 months