JBoss Tools SVN: r38275 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-30 11:31:49 -0500 (Mon, 30 Jan 2012)
New Revision: 38275
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java
Log:
AnnotationProperties (to simulate work with Annotation Properties view) class added
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java 2012-01-30 16:31:49 UTC (rev 38275)
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2010-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.ws.ui.bot.test.uiutils.views;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jws.WebService;
+
+
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.view.ViewBase;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+@WebService(targetNamespace = "http://views.uiutils.test.bot.ui.ws.tools.jboss.org/", portName = "AnnotationPropertiesPort", serviceName = "AnnotationPropertiesService")
+public class AnnotationProperties extends ViewBase {
+
+ public AnnotationProperties() {
+ viewObject = ActionItem.View.JAXWSAnnotationProperties.LABEL;
+ }
+
+ public List<SWTBotTreeItem> getAllAnnotations() {
+
+ List<SWTBotTreeItem> annotations = new ArrayList<SWTBotTreeItem>();
+ SWTBotTree annotationViewTree = null;
+ try {
+ annotationViewTree = show().bot().tree();
+ for (SWTBotTreeItem ti : annotationViewTree.getAllItems()) {
+ annotations.add(ti);
+ }
+ } catch (WidgetNotFoundException exc) {
+ log.warn("There are no web service annotations in Annotation Properties view");
+ }
+
+ return annotations;
+ }
+
+ public List<SWTBotTreeItem> getAnnotationValues(SWTBotTreeItem annotation) {
+
+ List<SWTBotTreeItem> annotValues = new ArrayList<SWTBotTreeItem>();
+ for (SWTBotTreeItem ti : annotValues) {
+ annotValues.add(ti);
+ }
+ return annotValues;
+
+ }
+
+ public boolean isAnnotationPresence(SWTBotTreeItem annotation) {
+ return annotation.isChecked();
+ }
+
+ public SWTBotTreeItem activateAnnotation(SWTBotTreeItem annotation) {
+ annotation.check();
+ return annotation;
+ }
+
+ public SWTBotTreeItem deactivateAnnotation(SWTBotTreeItem annotation) {
+ annotation.uncheck();
+ return annotation;
+ }
+
+ public SWTBotTreeItem changeAnnotationParamValue(SWTBotTreeItem annotation, String param,
+ String newValue) {
+ for (SWTBotTreeItem parameter : getAnnotationValues(annotation)) {
+ if (parameter.equals(param)) {
+ //change value of parameter no newValue
+ break;
+ }
+ }
+ return annotation;
+ }
+
+}
13 years, 1 month
JBoss Tools SVN: r38274 - trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-01-30 11:12:30 -0500 (Mon, 30 Jan 2012)
New Revision: 38274
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/PublishingFilterTest.java
Log:
Test for nested projects using filter
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/PublishingFilterTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/PublishingFilterTest.java 2012-01-30 16:01:15 UTC (rev 38273)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/PublishingFilterTest.java 2012-01-30 16:12:30 UTC (rev 38274)
@@ -44,7 +44,7 @@
ProjectUtility.deleteAllProjects();
ASTest.clearStateLocation();
}
-
+
public void testPublishingFilter() throws Exception {
publishingFilterTest(createProject("module1"), "**/*", "**/DONTincludeme.txt", 1);
}
@@ -59,7 +59,7 @@
}
private IProject createProject(String name) throws Exception {
- IDataModel dm = ProjectCreationUtil.getWebDataModel("module1", null, null,
+ IDataModel dm = ProjectCreationUtil.getWebDataModel(name, null, null,
"myContent", null, JavaEEFacetConstants.WEB_25, false);
OperationTestCase.runAndVerify(dm);
IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
@@ -69,6 +69,28 @@
IOUtil.setContents(f2, "leave me out");
return p;
}
+
+ private IProject[] createProjectWithNested(String earName, String webName) throws Exception {
+ IDataModel dm = ProjectCreationUtil.getEARDataModel(earName, "earContent", null, null, JavaEEFacetConstants.EAR_5, false);
+ IDataModel dm2 = ProjectCreationUtil.getWebDataModel(webName, earName, null, "webContent", null, JavaEEFacetConstants.WEB_25, false);
+
+ OperationTestCase.runAndVerify(dm);
+ OperationTestCase.runAndVerify(dm2);
+
+ IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(earName);
+ IFile f = p.getFile(new Path("earContent/includeme.txt"));
+ IOUtil.setContents(f, "includeMe");
+ IFile f2 = p.getFile(new Path("earContent/DONTincludeme.txt"));
+ IOUtil.setContents(f2, "leave me out");
+
+ IProject p2 = ResourcesPlugin.getWorkspace().getRoot().getProject(webName);
+ IFile f3 = p2.getFile(new Path("webContent/includeme.txt"));
+ IOUtil.setContents(f3, "includeMe");
+ IFile f4 = p2.getFile(new Path("webContent/DONTincludeme.txt"));
+ IOUtil.setContents(f4, "leave me out");
+ return new IProject[]{p, p2};
+ }
+
private void publishingFilterTest(IProject p, String inc, String exc, int difference) throws Exception {
IVirtualComponent vc = ComponentCore.createComponent(p);
vc.setMetaProperty("component.inclusion.patterns", inc);
@@ -145,7 +167,95 @@
server.publish(IServer.PUBLISH_FULL, new NullProgressMonitor());
ArrayList<IPath> changed = MockPublishMethod.changed;
assertEquals(changed.size(),fCount+1); // addition of 'root'
+ }
+
+ public void testServerIntegration_NestedProject() throws CoreException, IOException, Exception {
+ IServer server = ServerRuntimeUtils.createMockServerWithRuntime(IJBossToolingConstants.SERVER_AS_60,
+ "name1", "default");
+ server = ServerRuntimeUtils.useMock2PublishMethod(server);
+ IProject[] projects = createProjectWithNested("MyEar", "MyWeb");
+ ServerPreferences.getInstance().setAutoPublishing(false);
+ IModule earMod = ServerUtil.getModule(projects[0]);
+ server = ServerRuntimeUtils.addModule(server, earMod);
+ ModuleDelegate earDel = (ModuleDelegate)earMod.loadAdapter(ModuleDelegate.class, null);
+ DelegatingServerBehavior beh = (DelegatingServerBehavior)server.loadAdapter(DelegatingServerBehavior.class, null);
+ Mock2BehaviourDelegate del = (Mock2BehaviourDelegate)beh.getDelegate();
+ del.setUseSuperclassBehaviour(true);
+ IModulePathFilter earFilter = del.getPathFilter(new IModule[]{earMod});
+ IModuleResource[] originalMembers = earDel.members();
+ IModuleResource[] filteredMembers = earFilter == null ? originalMembers : earFilter.getFilteredMembers();
+ int oCount = PublishFilterDirectoryScannerTest.countAllResources(originalMembers);
+ int fCount = PublishFilterDirectoryScannerTest.countAllResources(filteredMembers);
+ assertEquals(oCount, fCount);
+
+ IVirtualComponent vc = ComponentCore.createComponent(earMod.getProject());
+
+ vc.setMetaProperty("component.inclusion.patterns", "**/*");
+ vc.setMetaProperty("component.exclusion.patterns", "**/*.txt");
+
+ earFilter = del.getPathFilter(new IModule[]{earMod});
+ originalMembers = earDel.members();
+ filteredMembers = earFilter.getFilteredMembers();
+ oCount = PublishFilterDirectoryScannerTest.countAllResources(originalMembers);
+ fCount = PublishFilterDirectoryScannerTest.countAllResources(filteredMembers);
+ assertEquals(oCount, fCount+2);
+
+ vc.setMetaProperty("component.inclusion.patterns", "**/*");
+ vc.setMetaProperty("component.exclusion.patterns", "**/DON*");
+
+ earFilter = del.getPathFilter(new IModule[]{earMod});
+ originalMembers = earDel.members();
+ filteredMembers = earFilter.getFilteredMembers();
+ oCount = PublishFilterDirectoryScannerTest.countAllResources(originalMembers);
+ fCount = PublishFilterDirectoryScannerTest.countAllResources(filteredMembers);
+ assertEquals(oCount, fCount+1);
+
+
+ IModuleResource r = PublishFilterDirectoryScanner.findResource(originalMembers, null,
+ new Path("DONTincludeme.txt"));
+ assertNotNull(r);
+ assertFalse(earFilter.shouldInclude(r));
+ r = PublishFilterDirectoryScanner.findResource(originalMembers, null,
+ new Path("includeme.txt"));
+ assertNotNull(r);
+ assertTrue(earFilter.shouldInclude(r));
+
+ IModule webMod = ServerUtil.getModule(projects[1]);
+ ModuleDelegate webDel = (ModuleDelegate)webMod.loadAdapter(ModuleDelegate.class, null);
+ IModulePathFilter webFilter = del.getPathFilter(new IModule[]{webMod});
+ IModuleResource[] webOriginalMembers = webDel.members();
+ IModuleResource[] webFilteredMembers = webFilter == null ? webOriginalMembers : webFilter.getFilteredMembers();
+ int webOCount = PublishFilterDirectoryScannerTest.countAllResources(webOriginalMembers);
+ int webFCount = PublishFilterDirectoryScannerTest.countAllResources(webFilteredMembers);
+
+ // Test the actual publish
+ MockPublishMethod.reset();
+ server.publish(IServer.PUBLISH_FULL, new NullProgressMonitor());
+ ArrayList<IPath> changed = MockPublishMethod.changed;
+ assertEquals(changed.size(),
+ fCount +1 /* root folder */ +1 /* application.xml, touched by our logic*/
+ + webFCount + 1 /* .war root */
+ );
+
+
+ IVirtualComponent webVC= ComponentCore.createComponent(earMod.getProject());
+ webVC.setMetaProperty("component.inclusion.patterns", "**/*");
+ webVC.setMetaProperty("component.exclusion.patterns", "**/DON*");
+ webFilteredMembers = webFilter == null ? webOriginalMembers : webFilter.getFilteredMembers();
+ webOCount = PublishFilterDirectoryScannerTest.countAllResources(webOriginalMembers);
+ webFCount = PublishFilterDirectoryScannerTest.countAllResources(webFilteredMembers);
+
+ // Test the actual publish
+ MockPublishMethod.reset();
+ server.publish(IServer.PUBLISH_FULL, new NullProgressMonitor());
+ changed = MockPublishMethod.changed;
+ assertEquals(changed.size(),
+ fCount +1 /* root folder */ +1 /* application.xml, touched by our logic*/
+ + webFCount + 1 /* .war root */
+ );
+
}
-}
+
+}
\ No newline at end of file
13 years, 1 month
JBoss Tools SVN: r38273 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest: explorer and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-30 11:01:15 -0500 (Mon, 30 Jan 2012)
New Revision: 38273
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.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/validation/RESTfulValidationTest.java
Log:
Modifying RESTful-like tests' setup phase
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java 2012-01-30 15:59:13 UTC (rev 38272)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java 2012-01-30 16:01:15 UTC (rev 38273)
@@ -54,18 +54,6 @@
return "RestService";
}
- @Override
- public void setup() {
- if (!projectExists(getWsProjectName())) {
- projectHelper.createProject(getWsProjectName());
- addRestSupport(getWsProjectName());
- }
- if (!projectExplorer.isFilePresent(getWsProjectName(), "Java Resources",
- "src", getWsPackage(), getWsName() + ".java")) {
- projectHelper.createClass(getWsProjectName(), getWsPackage(), getWsName());
- }
- }
-
@Test
public void testWithEmptyPrefix() {
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 15:59:13 UTC (rev 38272)
+++ 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 16:01:15 UTC (rev 38273)
@@ -46,20 +46,6 @@
return "RestService";
}
- @Override
- public void setup() {
- if (!projectExists(getWsProjectName())) {
- projectHelper.createProject(getWsProjectName());
- }
- if (!isRestSupportEnabled(getWsProjectName())) {
- addRestSupport(getWsProjectName());
- }
- if (!projectExplorer.isFilePresent(getWsProjectName(), "Java Resources",
- "src", getWsPackage(), getWsName() + ".java")) {
- projectHelper.createClass(getWsProjectName(), getWsPackage(), getWsName());
- }
- }
-
@Test
public void testAddingSimpleRESTMethods() {
@@ -170,6 +156,8 @@
restfulWizard = new RESTFullExplorerWizard(getWsProjectName());
SWTBotTreeItem[] restServices = restfulWizard.getAllRestServices();
+ assertTrue(restServices.length > 0);
+
for (SWTBotTreeItem restService : restServices) {
if (restfulWizard.getRestServiceName(restService).equals(RESTFulAnnotations.DELETE.getLabel())) {
assertTrue(restfulWizard.getPathForRestFulService(restService).equals("/rest/delete/{id}"));
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java 2012-01-30 15:59:13 UTC (rev 38272)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java 2012-01-30 16:01:15 UTC (rev 38273)
@@ -39,18 +39,6 @@
return "RestService";
}
- @Override
- public void setup() {
- if (!projectExists(getWsProjectName())) {
- projectHelper.createProject(getWsProjectName());
- addRestSupport(getWsProjectName());
- }
- if (!projectExplorer.isFilePresent(getWsProjectName(), "Java Resources",
- "src", getWsPackage(), getWsName() + ".java")) {
- projectHelper.createClass(getWsProjectName(), getWsPackage(), getWsName());
- }
- }
-
@Test
public void testCorrectValueValidation() {
13 years, 1 month
JBoss Tools SVN: r38272 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-30 10:59:13 -0500 (Mon, 30 Jan 2012)
New Revision: 38272
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
Log:
Fixed test base to work with RESTeasy libs in EAP 5.1 as well
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-01-30 15:57:37 UTC (rev 38271)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-01-30 15:59:13 UTC (rev 38272)
@@ -11,6 +11,7 @@
package org.jboss.tools.ws.ui.bot.test.rest;
+import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -21,7 +22,9 @@
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
import org.jboss.tools.ui.bot.ext.gen.IPreference;
+import org.jboss.tools.ui.bot.ext.helper.BuildPathHelper;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.jboss.tools.ws.ui.bot.test.WSTestBase;
import org.jboss.tools.ws.ui.bot.test.utils.NodeContextUtil;
@@ -50,6 +53,25 @@
ADD, REMOVE;
}
+ @Override
+ public void setup() {
+ if (!projectExists(getWsProjectName())) {
+ projectHelper.createProject(getWsProjectName());
+ }
+ if (!isRestSupportEnabled(getWsProjectName())) {
+ // workaround for EAP 5.1
+ if (configuredState.getServer().type.equals("EAP") &&
+ configuredState.getServer().version.equals("5.1")) {
+ addRestEasyLibs(getWsProjectName());
+ }
+ addRestSupport(getWsProjectName());
+ }
+ if (!projectExplorer.isFilePresent(getWsProjectName(), "Java Resources",
+ "src", getWsPackage(), getWsName() + ".java")) {
+ projectHelper.createClass(getWsProjectName(), getWsPackage(), getWsName());
+ }
+ }
+
protected SWTBotTreeItem[] getRESTValidationErrors(String wsProjectName) {
return ProblemsView.getFilteredErrorsTreeItems(bot,
PATH_PARAM_VALID_ERROR, "/" + wsProjectName, null, null);
@@ -63,18 +85,18 @@
modifyRESTValidation(ConfigureOption.REMOVE);
}
-
/**
* DO IT BETTER!!!!!!!!!!!!!!!!!!
*/
protected void modifyRESTValidation(ConfigureOption option) {
-
- SWTBot validationBot = openValidationPreference(VALIDATION_PREFERENCE, new ArrayList<String>());
-
+
+ SWTBot validationBot = openValidationPreference(VALIDATION_PREFERENCE,
+ new ArrayList<String>());
+
validationBot.button(ENABLE_ALL).click();
-
+
if (option == ConfigureOption.REMOVE) {
-
+
SWTBotTable validatorTable = validationBot.table();
int restValidationRow = -1;
for (int row = 0; row < validatorTable.rowCount(); row++) {
@@ -84,21 +106,21 @@
break;
}
}
-
+
assertTrue(restValidationRow >= 0);
-
+
validatorTable.click(restValidationRow, 1);
validatorTable.click(restValidationRow, 2);
}
-
+
validationBot.button("OK").click();
if (bot.activeShell().getText().equals(VALIDATION_SETTINGS_CHANGED)) {
bot.activeShell().bot().button("Yes").click();
}
-
+
bot.sleep(Timing.time3S());
util.waitForNonIgnoredJobs();
-
+
}
protected void addRestSupport(String wsProjectName) {
@@ -109,7 +131,6 @@
configureRestSupport(wsProjectName, ConfigureOption.REMOVE);
}
-
protected boolean isRestSupportEnabled(String wsProjectName) {
return (projectExplorer.isFilePresent(wsProjectName,
RESTFulAnnotations.REST_EXPLORER_LABEL.getLabel()) || projectExplorer
@@ -117,11 +138,39 @@
RESTFulAnnotations.REST_EXPLORER_LABEL_BUILD.getLabel()));
}
- protected static void addRestEasyLibs(String wsProjectName) {
- assertTrue(configuredState.getServer().type.equals("EAP"));
+
+ @SuppressWarnings("static-access")
+ private void addRestEasyLibs(String wsProjectName) {
+
+ List<File> restLibsPaths = getPathForRestLibs();
+
+ BuildPathHelper buildPathHelper = new BuildPathHelper();
+
+ for (File f : restLibsPaths) {
+ buildPathHelper.addExternalJar(f.getPath(), getWsProjectName());
+ }
+
}
-
+ private List<File> getPathForRestLibs() {
+
+ String runtimeHome = TestConfigurator.currentConfig.getServer().runtimeHome;
+
+ // index of last occurence of "/" in EAP runtime path: jboss-eap-5.1/jboss-as
+ int indexOfAS = runtimeHome.lastIndexOf("/");
+
+ // jboss-eap-5.1/jboss-as --> jboss-eap-5.1
+ String eapDirHome = runtimeHome.substring(0, indexOfAS);
+
+ String restEasyDirPath = eapDirHome + "/" + "resteasy";
+ File restEasyDir = new File(restEasyDirPath);
+
+
+ String[] restEasyLibs = {"jaxrs-api.jar"};
+// String[] restEasyLibs = {"jaxrs-api.jar", "resteasy-jaxrs.jar", "scannotation.jar"};
+ return resourceHelper.searchAllFiles(restEasyDir, restEasyLibs);
+ }
+
private void configureRestSupport(String wsProjectName,
ConfigureOption option) {
projectExplorer.selectProject(wsProjectName);
@@ -131,19 +180,21 @@
NodeContextUtil.nodeContextMenu(tree, item,
RESTFulAnnotations.CONFIGURE_MENU_LABEL.getLabel(),
option == ConfigureOption.ADD ? RESTFulAnnotations.REST_SUPPORT_MENU_LABEL_ADD
- .getLabel() : RESTFulAnnotations.REST_SUPPORT_MENU_LABEL_REMOVE.getLabel()).click();
+ .getLabel() : RESTFulAnnotations.REST_SUPPORT_MENU_LABEL_REMOVE
+ .getLabel()).click();
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
}
-
- private SWTBot openValidationPreference(final String name, final List<String> groupPath) {
+
+ private SWTBot openValidationPreference(final String name,
+ final List<String> groupPath) {
return open.preferenceOpen(new IPreference() {
-
+
@Override
public String getName() {
return name;
}
-
+
@Override
public List<String> getGroupPath() {
return groupPath;
13 years, 1 month
JBoss Tools SVN: r38271 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-30 10:57:37 -0500 (Mon, 30 Jan 2012)
New Revision: 38271
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ResourceHelper.java
Log:
Added methods for recursively searching file names in entered directory
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ResourceHelper.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ResourceHelper.java 2012-01-30 15:16:27 UTC (rev 38270)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ResourceHelper.java 2012-01-30 15:57:37 UTC (rev 38271)
@@ -11,9 +11,12 @@
package org.jboss.tools.ws.ui.bot.test.utils;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Scanner;
import org.eclipse.core.resources.IFile;
@@ -105,4 +108,43 @@
if (closeEdit) classEdit.close();
}
+ /**
+ * Method recursively searches files names in dir and returns them as List of File objects
+ * @param dir
+ * @param searchingFileNames
+ * @return
+ */
+ public List<File> searchAllFiles(File dir, String[] searchingFileNames) {
+
+ List<File> restEasyLibs = new ArrayList<File>();
+
+ for (String restEasyLibReq : searchingFileNames) {
+ restEasyLibs.add(searchInTextFiles(dir, restEasyLibReq));
+ }
+ return restEasyLibs;
+ }
+
+ /**
+ * Method recursively searches files name in dir and returns it as File object
+ * @param dir
+ * @param searchingFileName
+ * @return
+ */
+ public File searchInTextFiles(File dir, String searchingFileName) {
+ File[] files = dir.listFiles();
+ for (File file : files) {
+ if (file.isDirectory()) {
+ File f = searchInTextFiles(file, searchingFileName);
+ if (f != null) {
+ return f;
+ }
+ } else {
+ if (file.getName().equals(searchingFileName)) {
+ return file;
+ }
+ }
+ }
+ return null;
+ }
+
}
13 years, 1 month
JBoss Tools SVN: r38270 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-30 10:16:27 -0500 (Mon, 30 Jan 2012)
New Revision: 38270
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/ContainerElement.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/StringElement.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java
Log:
removed info-node from properties-tree
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/ContainerElement.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/ContainerElement.java 2012-01-30 14:31:50 UTC (rev 38269)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/ContainerElement.java 2012-01-30 15:16:27 UTC (rev 38270)
@@ -19,6 +19,10 @@
private final List<Object> children;
private final ContainerElement parent;
+ public ContainerElement(String property) {
+ this(property, null);
+ }
+
public ContainerElement(String property, ContainerElement parent) {
this.property = property;
this.children = new ArrayList<Object>();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/StringElement.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/StringElement.java 2012-01-30 14:31:50 UTC (rev 38269)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/StringElement.java 2012-01-30 15:16:27 UTC (rev 38270)
@@ -15,10 +15,18 @@
private final String value;
private final boolean isLink;
+ public StringElement(String property, String value) {
+ this(property, value, false, null);
+ }
+
public StringElement(String property, String value, ContainerElement parent) {
this(property, value, false, parent);
}
+ public StringElement(String property, String value, boolean isLink) {
+ this(property, value, isLink, null);
+ }
+
public StringElement(String property, String value, boolean isLink, ContainerElement parent) {
super(property, parent);
this.value = value;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java 2012-01-30 14:31:50 UTC (rev 38269)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java 2012-01-30 15:16:27 UTC (rev 38270)
@@ -4,9 +4,12 @@
package org.jboss.tools.openshift.express.internal.ui.wizard;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
import org.jboss.tools.openshift.express.internal.ui.propertytable.AbstractPropertyTableContentProvider;
import org.jboss.tools.openshift.express.internal.ui.propertytable.ContainerElement;
+import org.jboss.tools.openshift.express.internal.ui.propertytable.IProperty;
import org.jboss.tools.openshift.express.internal.ui.propertytable.StringElement;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
@@ -23,32 +26,32 @@
@Override
public Object[] getElements(Object inputElement) {
- Object[] elements = null;
+ List<IProperty> elements = new ArrayList<IProperty>();
if (inputElement instanceof IApplication) {
try {
IApplication application = (IApplication) inputElement;
- final ContainerElement infoContainer = new ContainerElement("info", null);
- infoContainer.add(new StringElement("Name", application.getName(), infoContainer));
- infoContainer.add(new StringElement("Public URL", application.getApplicationUrl().toString(), true,
- infoContainer));
- infoContainer.add(new StringElement("Type", application.getCartridge().getName(), infoContainer));
- final SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd 'at' HH:mm:ss");
- infoContainer.add(
- new StringElement("Created on", format.format(application.getCreationTime()), infoContainer));
- infoContainer.add(new StringElement("UUID", application.getUUID(), infoContainer));
- infoContainer.add(new StringElement("Git URL", application.getGitUri(), infoContainer));
- infoContainer.add(createCartridges(application, infoContainer));
- elements = new Object[] { infoContainer };
+
+ elements.add(new StringElement("Name", application.getName()));
+ elements.add(
+ new StringElement("Public URL", application.getApplicationUrl().toString(), true));
+ elements.add(new StringElement("Type", application.getCartridge().getName()));
+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd 'at' HH:mm:ss");
+ elements.add(
+ new StringElement("Created on", format.format(application.getCreationTime())));
+ elements.add(new StringElement("UUID", application.getUUID()));
+ elements.add(new StringElement("Git URL", application.getGitUri()));
+ elements.add(createCartridges(application));
+
} catch (Exception e) {
Logger.error("Failed to display details for OpenShift application", e);
}
}
- return elements;
+ return elements.toArray();
}
- private ContainerElement createCartridges(IApplication application, ContainerElement infoContainer)
+ private ContainerElement createCartridges(IApplication application)
throws OpenShiftException {
- ContainerElement cartridgesContainer = new ContainerElement("Cartridges", infoContainer);
+ ContainerElement cartridgesContainer = new ContainerElement("Cartridges");
for (IEmbeddableCartridge cartridge : application.getEmbeddedCartridges()) {
cartridgesContainer.add(
new StringElement(cartridge.getName(), cartridge.getUrl().toString(), true,
13 years, 1 month
JBoss Tools SVN: r38269 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-01-30 09:31:50 -0500 (Mon, 30 Jan 2012)
New Revision: 38269
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
Log:
Configuration of screenshots directory
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-01-30 13:49:18 UTC (rev 38268)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-01-30 14:31:50 UTC (rev 38269)
@@ -16,7 +16,7 @@
<jbosstools.test.jboss-gatein.home>${requirement.build.root}/GateIn-3.1.0-GA</jbosstools.test.jboss-gatein.home>
<jbosstools.test.jboss-seam.home>${requirement.build.root}/jboss-seam-2.2.1.CR2</jbosstools.test.jboss-seam.home> <!--TODO setup default path -->
<configurations.dir>resources/project_config_files</configurations.dir>
- <systemProperties>-Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam.home=${jbosstools.test.jboss-seam.home} -Dtest.configurations.dir=${configurations.dir}</systemProperties>
+ <systemProperties>-Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam.home=${jbosstools.test.jboss-seam.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.outputDirectory}/screenshots</systemProperties>
</properties>
<build>
13 years, 1 month
JBoss Tools SVN: r38268 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-30 08:49:18 -0500 (Mon, 30 Jan 2012)
New Revision: 38268
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
Log:
[JBIDE-10724] open browser on left button only
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-30 13:43:59 UTC (rev 38267)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-30 13:49:18 UTC (rev 38268)
@@ -47,7 +47,7 @@
link.setText(property.getValue());
link.setBackground(cell.getBackground());
link.addMouseListener(onLinkClicked(property.getValue()));
-
+
TreeUtils.createTreeEditor(link, property.getValue(), cell);
}
@@ -69,8 +69,10 @@
@Override
public void mouseUp(MouseEvent e) {
- BrowserUtil.checkedCreateExternalBrowser(
- url, OpenShiftUIActivator.PLUGIN_ID, OpenShiftUIActivator.getDefault().getLog());
+ if (e.button == 1) { // left button only
+ BrowserUtil.checkedCreateExternalBrowser(
+ url, OpenShiftUIActivator.PLUGIN_ID, OpenShiftUIActivator.getDefault().getLog());
+ }
}
};
}
13 years, 1 month
JBoss Tools SVN: r38267 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-30 08:43:59 -0500 (Mon, 30 Jan 2012)
New Revision: 38267
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
Log:
[JBIDE-10724] switched from link to hyperlink widget. no displacement is visible any more, the hyperlink is showing up very quickly (whereas link was slow)
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-30 13:10:08 UTC (rev 38266)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-30 13:43:59 UTC (rev 38267)
@@ -10,14 +10,16 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.propertytable;
+import org.eclipse.jface.preference.JFacePreferences;
+import org.eclipse.jface.resource.JFaceResources;
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.eclipse.ui.forms.widgets.Hyperlink;
import org.jboss.tools.common.ui.BrowserUtil;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.TreeUtils;
@@ -39,8 +41,10 @@
}
protected void createLink(IProperty property, final ViewerCell cell) {
- Link link = new Link((Tree) cell.getControl(), SWT.NONE);
- link.setText("<a>" + property.getValue() + "</a>");
+ final Hyperlink link = new Hyperlink((Tree) cell.getControl(), SWT.TRANSPARENT);
+ link.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.ACTIVE_HYPERLINK_COLOR));
+ link.setUnderlined(true);
+ link.setText(property.getValue());
link.setBackground(cell.getBackground());
link.addMouseListener(onLinkClicked(property.getValue()));
13 years, 1 month
JBoss Tools SVN: r38266 - 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 08:10:08 -0500 (Mon, 30 Jan 2012)
New Revision: 38266
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/CopyPropertyAction.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/commands/
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 11:35:27 UTC (rev 38265)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-01-30 13:10:08 UTC (rev 38266)
@@ -270,31 +270,5 @@
id="org.jboss.tools.openshift.express.ui.server.fragment"
typeIds="org.jboss.tools.openshift.express.openshift.server.type">
</fragment>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- id="org.jboss.tools.openshift.express.internal.ui.commands.CopyPropertyCommand"
- name="Copy property command">
- </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.commands.CopyPropertyCommand"
- icon="icons/copy_edit_co.gif"
- label="Copy"
- style="push">
- </command>
- </menuContribution>
- </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/propertytable/CopyPropertyAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/CopyPropertyAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/CopyPropertyAction.java 2012-01-30 13:10:08 UTC (rev 38266)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * 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.propertytable;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.SelectionProviderAction;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class CopyPropertyAction extends SelectionProviderAction {
+
+ private ISelectionProvider selectionProvider;
+
+ public CopyPropertyAction(ISelectionProvider provider) {
+ super(provider, ActionFactory.COPY.getId());
+ initAction();
+ this.selectionProvider = provider;
+ }
+
+ protected void initAction() {
+ ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
+ setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+ setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
+ setActionDefinitionId(ActionFactory.COPY.getCommandId());
+ }
+
+ @Override
+ public void run() {
+ ISelection selection = selectionProvider.getSelection();
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ if (structuredSelection.getFirstElement() instanceof IProperty) {
+ IProperty property = (IProperty) structuredSelection.getFirstElement();
+ Clipboard clipboard = new Clipboard(Display.getDefault());
+ clipboard.setContents(
+ new Object[] { property.getValue() },
+ new Transfer[] { TextTransfer.getInstance() });
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/CopyPropertyAction.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 11:35:27 UTC (rev 38265)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java 2012-01-30 13:10:08 UTC (rev 38266)
@@ -29,6 +29,7 @@
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftImages;
+import org.jboss.tools.openshift.express.internal.ui.propertytable.CopyPropertyAction;
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;
@@ -41,8 +42,6 @@
*/
public class ApplicationDetailsDialog extends TitleAreaDialog {
- 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) {
@@ -70,7 +69,7 @@
TreeViewer viewer = createApplicationDetailsTable(dialogArea);
fillApplicationDetailsTable(viewer);
createContextMenu(viewer);
-
+
Label buttonsSeparator = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR);
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.TOP).grab(true, false).applyTo(buttonsSeparator);
@@ -80,7 +79,7 @@
private void createContextMenu(TreeViewer viewer) {
IMenuManager contextMenu = UIUtils.createContextMenu(viewer.getControl());
- UIUtils.registerContributionManager(CONTEXT_MENU_ID, contextMenu, viewer.getControl());
+ contextMenu.add(new CopyPropertyAction(viewer));
}
private void fillApplicationDetailsTable(final TreeViewer viewer) {
@@ -128,4 +127,6 @@
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}
+
+
}
13 years, 1 month