JBoss Tools SVN: r28603 - branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2011-01-25 12:53:23 -0500 (Tue, 25 Jan 2011)
New Revision: 28603
Modified:
branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingPreviewPage.java
Log:
https://issues.jboss.org/browse/JBIDE-8213 - fixed
Modified: branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingPreviewPage.java
===================================================================
--- branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingPreviewPage.java 2011-01-25 17:53:01 UTC (rev 28602)
+++ branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingPreviewPage.java 2011-01-25 17:53:23 UTC (rev 28603)
@@ -27,7 +27,6 @@
import org.eclipse.core.filebuffers.LocationKind;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -205,76 +204,51 @@
* @return
*/
protected boolean updateOneChange(final CompositeChange cc, final IJavaProject proj, File fileSrc) {
+ boolean res = false;
if (!fileSrc.exists()) {
- return false;
+ return res;
}
if (fileSrc.isDirectory()) {
- return false;
+ return res;
}
- final IPath basePath = proj.getResource().getParent().getLocation();
- final IPath projPath = proj.getResource().getLocation();
final IPath place2Gen = getRootPlace2Gen().append(proj.getElementName());
- IPath filePathFrom = new Path(fileSrc.getPath());
- IPath filePathTo = filePathFrom.makeRelativeTo(place2Gen);
- filePathTo = projPath.append(filePathTo);
- final IPath filePathTo_Show = filePathTo.makeRelativeTo(basePath);
- File fileOrig = filePathTo.toFile();
- if (fileOrig.exists()) {
- final IPath filePathTo_Proj = filePathTo.makeRelativeTo(projPath);
- class ResHolder {
- public IResource res2Update = null;
- }
- final ResHolder res2UpdateHolder = new ResHolder();
- IResourceVisitor visitor = new IResourceVisitor() {
-
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getProjectRelativePath().equals(filePathTo_Proj)) {
- res2UpdateHolder.res2Update = resource;
- return false;
- }
- if (resource.getProjectRelativePath().isPrefixOf(filePathTo_Proj)) {
- return true;
- }
- return false;
+ final IPath filePathFrom = new Path(fileSrc.getPath());
+ final IPath filePathTo_Proj = filePathFrom.makeRelativeTo(place2Gen);
+ final IPath filePathTo_Show = proj.getPath().append(filePathTo_Proj);
+ final IResource res2Update = proj.getProject().findMember(filePathTo_Proj);
+ if (res2Update != null) {
+ final ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
+ ITextFileBuffer textFileBuffer = bufferManager.getTextFileBuffer(filePathTo_Show, LocationKind.IFILE);
+ if (textFileBuffer == null) {
+ try {
+ bufferManager.connect(filePathTo_Show, LocationKind.IFILE, null);
+ paths2Disconnect.add(filePathTo_Show);
+ } catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage("CoreException: ", e); //$NON-NLS-1$
}
-
- };
- try {
- proj.getResource().accept(visitor);
- } catch (CoreException e1) {
- //ignore
+ textFileBuffer = bufferManager.getTextFileBuffer(filePathTo_Show, LocationKind.IFILE);
}
- if (res2UpdateHolder.res2Update != null) {
- final ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
- ITextFileBuffer textFileBuffer = bufferManager.getTextFileBuffer(filePathTo_Show, LocationKind.IFILE);
- if (textFileBuffer == null) {
- try {
- bufferManager.connect(filePathTo_Show, LocationKind.IFILE, null);
- paths2Disconnect.add(filePathTo_Show);
- } catch (CoreException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("CoreException: ", e); //$NON-NLS-1$
- }
- textFileBuffer = bufferManager.getTextFileBuffer(filePathTo_Show, LocationKind.IFILE);
- }
- if (textFileBuffer != null) {
- IDocument documentChange = textFileBuffer.getDocument();
- //
- String str = readInto(fileSrc);
- TextEdit textEdit = new ReplaceEdit(0, documentChange.getLength(), str.toString());
- //
- TextFileChange change = new TextFileChange(filePathTo_Show.toString(),
- (IFile)res2UpdateHolder.res2Update);
- change.setSaveMode(TextFileChange.LEAVE_DIRTY);
- change.setEdit(textEdit);
- cc.add(change);
- }
+ if (textFileBuffer != null) {
+ IDocument documentChange = textFileBuffer.getDocument();
+ //
+ String str = readInto(fileSrc);
+ TextEdit textEdit = new ReplaceEdit(0, documentChange.getLength(), str.toString());
+ //
+ TextFileChange change = new TextFileChange(filePathTo_Show.toString(), (IFile)res2Update);
+ change.setSaveMode(TextFileChange.LEAVE_DIRTY);
+ change.setEdit(textEdit);
+ cc.add(change);
+ //
+ res = true;
}
} else {
String str = readInto(fileSrc);
CreateTextFileChange change = new CreateTextFileChange(filePathTo_Show, str.toString(), null, "hbm.xml"); //$NON-NLS-1$
cc.add(change);
+ //
+ res = true;
}
- return true;
+ return res;
}
/**
13 years, 5 months
JBoss Tools SVN: r28602 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2011-01-25 12:53:01 -0500 (Tue, 25 Jan 2011)
New Revision: 28602
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingPreviewPage.java
Log:
https://issues.jboss.org/browse/JBIDE-8213 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingPreviewPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingPreviewPage.java 2011-01-25 17:12:20 UTC (rev 28601)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingPreviewPage.java 2011-01-25 17:53:01 UTC (rev 28602)
@@ -27,7 +27,6 @@
import org.eclipse.core.filebuffers.LocationKind;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -205,76 +204,51 @@
* @return
*/
protected boolean updateOneChange(final CompositeChange cc, final IJavaProject proj, File fileSrc) {
+ boolean res = false;
if (!fileSrc.exists()) {
- return false;
+ return res;
}
if (fileSrc.isDirectory()) {
- return false;
+ return res;
}
- final IPath basePath = proj.getResource().getParent().getLocation();
- final IPath projPath = proj.getResource().getLocation();
final IPath place2Gen = getRootPlace2Gen().append(proj.getElementName());
- IPath filePathFrom = new Path(fileSrc.getPath());
- IPath filePathTo = filePathFrom.makeRelativeTo(place2Gen);
- filePathTo = projPath.append(filePathTo);
- final IPath filePathTo_Show = filePathTo.makeRelativeTo(basePath);
- File fileOrig = filePathTo.toFile();
- if (fileOrig.exists()) {
- final IPath filePathTo_Proj = filePathTo.makeRelativeTo(projPath);
- class ResHolder {
- public IResource res2Update = null;
- }
- final ResHolder res2UpdateHolder = new ResHolder();
- IResourceVisitor visitor = new IResourceVisitor() {
-
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getProjectRelativePath().equals(filePathTo_Proj)) {
- res2UpdateHolder.res2Update = resource;
- return false;
- }
- if (resource.getProjectRelativePath().isPrefixOf(filePathTo_Proj)) {
- return true;
- }
- return false;
+ final IPath filePathFrom = new Path(fileSrc.getPath());
+ final IPath filePathTo_Proj = filePathFrom.makeRelativeTo(place2Gen);
+ final IPath filePathTo_Show = proj.getPath().append(filePathTo_Proj);
+ final IResource res2Update = proj.getProject().findMember(filePathTo_Proj);
+ if (res2Update != null) {
+ final ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
+ ITextFileBuffer textFileBuffer = bufferManager.getTextFileBuffer(filePathTo_Show, LocationKind.IFILE);
+ if (textFileBuffer == null) {
+ try {
+ bufferManager.connect(filePathTo_Show, LocationKind.IFILE, null);
+ paths2Disconnect.add(filePathTo_Show);
+ } catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage("CoreException: ", e); //$NON-NLS-1$
}
-
- };
- try {
- proj.getResource().accept(visitor);
- } catch (CoreException e1) {
- //ignore
+ textFileBuffer = bufferManager.getTextFileBuffer(filePathTo_Show, LocationKind.IFILE);
}
- if (res2UpdateHolder.res2Update != null) {
- final ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
- ITextFileBuffer textFileBuffer = bufferManager.getTextFileBuffer(filePathTo_Show, LocationKind.IFILE);
- if (textFileBuffer == null) {
- try {
- bufferManager.connect(filePathTo_Show, LocationKind.IFILE, null);
- paths2Disconnect.add(filePathTo_Show);
- } catch (CoreException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("CoreException: ", e); //$NON-NLS-1$
- }
- textFileBuffer = bufferManager.getTextFileBuffer(filePathTo_Show, LocationKind.IFILE);
- }
- if (textFileBuffer != null) {
- IDocument documentChange = textFileBuffer.getDocument();
- //
- String str = readInto(fileSrc);
- TextEdit textEdit = new ReplaceEdit(0, documentChange.getLength(), str.toString());
- //
- TextFileChange change = new TextFileChange(filePathTo_Show.toString(),
- (IFile)res2UpdateHolder.res2Update);
- change.setSaveMode(TextFileChange.LEAVE_DIRTY);
- change.setEdit(textEdit);
- cc.add(change);
- }
+ if (textFileBuffer != null) {
+ IDocument documentChange = textFileBuffer.getDocument();
+ //
+ String str = readInto(fileSrc);
+ TextEdit textEdit = new ReplaceEdit(0, documentChange.getLength(), str.toString());
+ //
+ TextFileChange change = new TextFileChange(filePathTo_Show.toString(), (IFile)res2Update);
+ change.setSaveMode(TextFileChange.LEAVE_DIRTY);
+ change.setEdit(textEdit);
+ cc.add(change);
+ //
+ res = true;
}
} else {
String str = readInto(fileSrc);
CreateTextFileChange change = new CreateTextFileChange(filePathTo_Show, str.toString(), null, "hbm.xml"); //$NON-NLS-1$
cc.add(change);
+ //
+ res = true;
}
- return true;
+ return res;
}
/**
13 years, 5 months
JBoss Tools SVN: r28601 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: icons and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-25 12:12:20 -0500 (Tue, 25 Jan 2011)
New Revision: 28601
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/keys.gif
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/keysd.gif
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/AbstractDeltaCloudWizard.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
Log:
[JBIDE-7772]
* added command, handler, plugin.xml-declaration and icosn for managing keys in the context-menu of the cloud viewer
* extracted common wizard code & moved it to AbstractDeltaCloudWizard
* extracted common handler code & moved it to WizardUtils
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-01-25 17:12:20 UTC (rev 28601)
@@ -1,3 +1,23 @@
+2011-01-25 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * plugin.xml:
+ * plugin.properties:
+ * src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java:
+ [JBIDE-7772] added command, handler, plugin.xml-declaration and icosn for managing keys in the
+ context-menu of the cloud viewer
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java:
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java:
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java:
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java:
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/AbstractDeltaCloudWizard.java:
+ [JBIDE-7772] extracted common wizard code & moved it to AbstractDeltaCloudWizard
+ * src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java:
+ * src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java (.run):
+ * src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java (.run):
+ * src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java (.run):
+ * src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java (openWizardDialog):
+ [JBIDE-7772] extracted common handler code & moved it to WizardUtils
+
2011-01-17 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java (nextPageOrFinish):
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/keys.gif
===================================================================
(Binary files differ)
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/keys.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/keysd.gif
===================================================================
(Binary files differ)
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/keysd.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.properties 2011-01-25 17:12:20 UTC (rev 28601)
@@ -43,7 +43,7 @@
command.newconnection.name = New Connection
command.editconnection.description = Edits a Connection
command.editconnection.name = Edit Connection
-command.createinstance.description.0 = Launches an instance
+command.createinstance.description = Launches an instance
command.createinstance.name = Launch Instance
command.startinstance.description = Starts a cloud instance
command.startinstance.name = Start
@@ -53,6 +53,10 @@
command.rebootinstance.name = Reboot
command.destroyinstance.name = Destroy
command.destroyinstance.description = Destroys a cloud instance
+command.managekeys.description = Manages the keys of a cloud
+command.managekeys.name = Manage Keys
+command.managekeys.label = Manage Keys
+command.managekeys.tooltip = Manage Keys
command.filterimages.description = Filters images
command.filterimages.name = Filter Images...
command.filterinstances.description = Filters instances
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-01-25 17:12:20 UTC (rev 28601)
@@ -269,6 +269,32 @@
</extension>
<extension
point="org.eclipse.ui.handlers">
+ <!-- Manage Keys command handler -->
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.ManageKeysHandler"
+ commandId="org.jboss.tools.deltacloud.ui.managekeys">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate operator="and">
+ <adapt
+ type="org.jboss.tools.deltacloud.core.DeltaCloud">
+ <test property="org.jboss.tools.deltacloud.ui.commands.isValid"
+ value="true"/>
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count value="1" />
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
<!-- image command handlers -->
<handler
class="org.jboss.tools.deltacloud.ui.commands.CreateInstanceFromSpecificImageHandler"
@@ -489,15 +515,32 @@
name="connections"
visible="true" />
<separator
+ name="keys"
+ visible="true" />
+ <separator
name="images"
visible="true" />
<separator
name="filters"
visible="true" />
</menuContribution>
- <!-- instance commands -->
+ <!-- manage keys command -->
<menuContribution
allPopups="true"
+ locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView?after=keys">
+ <!-- connection commands -->
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.managekeys"
+ icon="icons/keys.gif"
+ disabledIcon="icons/keysd.gif"
+ label="%command.managekeys.label"
+ style="push"
+ tooltip="%command.managekeys.tooltip">
+ </command>
+ </menuContribution>
+ <!-- instance commands -->
+ <menuContribution
+ allPopups="true"
locationURI="popup:org.jboss.tools.deltacloud.ui.views.DeltaCloudView?after=instances">
<command
commandId="org.jboss.tools.deltacloud.ui.startinstance"
@@ -730,6 +773,12 @@
id="org.jboss.tools.deltacloud.ui.destroyinstance"
name="%command.destroyinstance.name">
</command>
+ <!-- manage keys command -->
+ <command
+ description="%command.managekeys.description"
+ id="org.jboss.tools.deltacloud.ui.managekeys"
+ name="%command.managekeys.name">
+ </command>
<!-- filter commands -->
<command
description="%command.filterimages.description"
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterImagesHandler.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -17,13 +17,12 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
import org.jboss.tools.internal.deltacloud.ui.wizards.ImageFilterWizard;
/**
@@ -47,10 +46,7 @@
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
- IWizard wizard = new ImageFilterWizard(cloud);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
+ WizardUtils.openWizardDialog(new ImageFilterWizard(cloud), shell);
}
});
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/FilterInstancesHandler.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -17,13 +17,12 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
import org.jboss.tools.internal.deltacloud.ui.wizards.InstanceFilterWizard;
/**
@@ -48,10 +47,7 @@
@Override
public void run() {
- IWizard wizard = new InstanceFilterWizard(cloud);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
+ WizardUtils.openWizardDialog(new InstanceFilterWizard(cloud), shell);
}
});
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
+import org.jboss.tools.internal.deltacloud.ui.wizards.ManageKeysWizard;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ManageKeysHandler extends AbstractHandler implements IHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ DeltaCloud cloud = UIUtils.getFirstAdaptedElement(selection, DeltaCloud.class);
+ createImagesFilter(cloud, HandlerUtil.getActiveShell(event));
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void createImagesFilter(final DeltaCloud cloud, final Shell shell) {
+ if (cloud != null) {
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ WizardUtils.openWizardDialog(new ManageKeysWizard(cloud), shell);
+ }
+ });
+
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/ManageKeysHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/NewConnectionHandler.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -14,9 +14,9 @@
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
import org.jboss.tools.internal.deltacloud.ui.wizards.NewCloudConnectionWizard;
/**
@@ -26,13 +26,8 @@
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- NewCloudConnectionWizard wizard = new NewCloudConnectionWizard();
- wizard.init(PlatformUI.getWorkbench(), new StructuredSelection());
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- wizard);
- dialog.create();
- dialog.open();
-
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ WizardUtils.openWizardDialog(new NewCloudConnectionWizard(), shell);
return Status.OK_STATUS;
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/WizardUtils.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -22,6 +22,8 @@
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
/**
* @author André Dietisheim
@@ -115,4 +117,10 @@
}
}
}
+
+ public static void openWizardDialog(IWizard wizard, Shell shell) {
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/AbstractDeltaCloudWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/AbstractDeltaCloudWizard.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/AbstractDeltaCloudWizard.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+
+/**
+ * @author André Dietisheim
+ */
+public abstract class AbstractDeltaCloudWizard extends Wizard {
+
+ private DeltaCloud cloud;
+
+ public AbstractDeltaCloudWizard(DeltaCloud cloud) {
+ this.cloud = cloud;
+ }
+
+ protected DeltaCloud getDeltaCloud() {
+ return cloud;
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/AbstractDeltaCloudWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -10,26 +10,24 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
-import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
/**
* @author Jeff Johnston
*/
-public class ImageFilterWizard extends Wizard {
+public class ImageFilterWizard extends AbstractDeltaCloudWizard {
- private DeltaCloud cloud;
private ImageFilterPage mainPage;
public ImageFilterWizard(DeltaCloud cloud) {
- this.cloud = cloud;
+ super(cloud);
}
@Override
public void addPages() {
// TODO Auto-generated method stub
- mainPage = new ImageFilterPage(cloud);
+ mainPage = new ImageFilterPage(getDeltaCloud());
addPage(mainPage);
}
@@ -46,7 +44,7 @@
String descRule = mainPage.getDescRule();
try {
- cloud.updateImageFilter(
+ getDeltaCloud().updateImageFilter(
nameRule + ";" + //$NON-NLS-1$
idRule + ";" + //$NON-NLS-1$
archRule + ";" + //$NON-NLS-1$
@@ -55,7 +53,7 @@
// TODO: internationalize strings
ErrorUtils.handleError(
"Error",
- "Cloud not get update filters on cloud " + cloud.getName(), e, getShell());
+ "Cloud not get update filters on cloud " + getDeltaCloud().getName(), e, getShell());
}
return true;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
-import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.widgets.Display;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
@@ -18,18 +17,17 @@
/**
* @author Jeff Johnston
*/
-public class InstanceFilterWizard extends Wizard {
+public class InstanceFilterWizard extends AbstractDeltaCloudWizard {
- private DeltaCloud cloud;
private InstanceFilterPage mainPage;
public InstanceFilterWizard(DeltaCloud cloud) {
- this.cloud = cloud;
+ super(cloud);
}
@Override
public void addPages() {
- mainPage = new InstanceFilterPage(cloud);
+ mainPage = new InstanceFilterPage(getDeltaCloud());
addPage(mainPage);
}
@@ -49,7 +47,7 @@
String profileRule = mainPage.getProfileRule();
try {
- cloud.updateInstanceFilter(nameRule + ";" + //$NON-NLS-1$
+ getDeltaCloud().updateInstanceFilter(nameRule + ";" + //$NON-NLS-1$
idRule + ";" + //$NON-NLS-1$
imageIdRule + ";" + //$NON-NLS-1$
ownerIdRule + ";" + //$NON-NLS-1$
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
-import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudKey;
@@ -18,14 +17,13 @@
* @author Jeff Johnston
* @author André Dietisheim
*/
-public class ManageKeysWizard extends Wizard {
+public class ManageKeysWizard extends AbstractDeltaCloudWizard {
- private DeltaCloud cloud;
private ManageKeysPage mainPage;
private DeltaCloudKey key;
public ManageKeysWizard(DeltaCloud cloud) {
- this.cloud = cloud;
+ super(cloud);
}
public DeltaCloudKey getKey() {
@@ -34,7 +32,7 @@
@Override
public void addPages() {
- mainPage = new ManageKeysPage(cloud);
+ mainPage = new ManageKeysPage(getDeltaCloud());
addPage(mainPage);
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2011-01-25 16:12:23 UTC (rev 28600)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2011-01-25 17:12:20 UTC (rev 28601)
@@ -18,7 +18,6 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.common.jobs.ChainedJob;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
@@ -36,7 +35,7 @@
* @author Jeff Johnston
* @author André Dieitsheim
*/
-public class NewInstanceWizard extends Wizard {
+public class NewInstanceWizard extends AbstractDeltaCloudWizard {
private final static String CREATE_INSTANCE_FAILURE_TITLE = "CreateInstanceError.title"; //$NON-NLS-1$
private final static String CREATE_INSTANCE_FAILURE_MSG = "CreateInstanceError.msg"; //$NON-NLS-1$
@@ -47,7 +46,6 @@
protected NewInstancePage mainPage;
protected INewInstanceWizardPage[] additionalPages;
- protected DeltaCloud cloud;
protected DeltaCloudInstance instance;
/**
* Initial image, may be null
@@ -55,7 +53,7 @@
private DeltaCloudImage image;
public NewInstanceWizard(DeltaCloud cloud) {
- this.cloud = cloud;
+ super(cloud);
try {
this.image = cloud.getLastImage();
} catch (DeltaCloudException e) {
@@ -70,7 +68,7 @@
@Override
public void addPages() {
- mainPage = new NewInstancePage(cloud, image);
+ mainPage = new NewInstancePage(getDeltaCloud(), image);
addPage(mainPage);
additionalPages = DeltacloudUIExtensionManager.getDefault().loadNewInstanceWizardPages();
for (int i = 0; i < additionalPages.length; i++) {
@@ -100,6 +98,7 @@
String name = model.getName();
// Save persistent settings for this particular cloud
+ DeltaCloud cloud = getDeltaCloud();
cloud.setLastImageId(imageId);
cloud.setLastKeyname(keyId);
13 years, 5 months
JBoss Tools SVN: r28600 - in trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core: internal/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-01-25 11:12:23 -0500 (Tue, 25 Jan 2011)
New Revision: 28600
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDelegate.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java
Log:
JBDS-1410 RichFaces don't work in portlet generated by JBDS
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java 2011-01-25 15:11:45 UTC (rev 28599)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java 2011-01-25 16:12:23 UTC (rev 28600)
@@ -21,6 +21,8 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.jst.j2ee.model.IModelProvider;
import org.eclipse.jst.j2ee.model.ModelProviderManager;
+import org.eclipse.jst.javaee.web.WebApp;
+import org.eclipse.jst.javaee.web.WebAppVersionType;
import org.eclipse.ui.dialogs.IOverwriteQuery;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
@@ -337,4 +339,11 @@
}
return null;
}
+
+ public static boolean isWebApp25(final Object webApp) {
+ if (webApp instanceof WebApp
+ && ((WebApp) webApp).getVersion() == WebAppVersionType._25_LITERAL)
+ return true;
+ return false;
+ }
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDelegate.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDelegate.java 2011-01-25 15:11:45 UTC (rev 28599)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDelegate.java 2011-01-25 16:12:23 UTC (rev 28600)
@@ -10,62 +10,32 @@
************************************************************************************/
package org.jboss.tools.portlet.core.internal.project.facet;
-import java.io.File;
-import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.Iterator;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.StringTokenizer;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.javaee.web.WebApp;
-import org.eclipse.jst.javaee.web.WebAppVersionType;
import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
import org.eclipse.jst.jsf.facesconfig.emf.StateManagerType;
import org.eclipse.jst.jsf.facesconfig.emf.ViewHandlerType;
import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
-import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.server.core.IRuntime;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.tools.portlet.core.IJBossWebUtil;
import org.jboss.tools.portlet.core.IPortletConstants;
import org.jboss.tools.portlet.core.JBossWebUtil;
import org.jboss.tools.portlet.core.JBossWebUtil25;
import org.jboss.tools.portlet.core.Messages;
import org.jboss.tools.portlet.core.PortletCoreActivator;
-import org.jboss.tools.portlet.core.libprov.AbstractLibraryProviderInstallOperationConfig;
-import org.jboss.tools.portlet.core.libprov.JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig;
/**
* @author snjeza
@@ -73,7 +43,6 @@
*/
public class JSFPortletFacetInstallDelegate implements IDelegate {
- private static final String JST_SEAM_FACET = "jst.seam"; //$NON-NLS-1$
private static final String ORG_JBOSS_PORTLET_STATE_MANAGER = "org.jboss.portletbridge.application.PortletStateManager"; //$NON-NLS-1$
private static final String ORG_JBOSS_PORTLET_VIEW_HANDLER = "org.jboss.portletbridge.application.PortletViewHandler"; //$NON-NLS-1$
@@ -120,14 +89,9 @@
configureFacesConfig(project, monitor, config);
- //configureClassPath(project, monitor, config);
-
//Configure libraries
- ( (LibraryInstallDelegate) config.getProperty( IPortletConstants.JSFPORTLET_LIBRARY_PROVIDER_DELEGATE ) ).execute( new NullProgressMonitor() );
+ ( (LibraryInstallDelegate) config.getProperty( IPortletConstants.JSFPORTLET_LIBRARY_PROVIDER_DELEGATE ) ).execute( monitor );
-
- configureWebApp(project, monitor, config);
-
if (monitor != null) {
monitor.worked(1);
}
@@ -247,296 +211,12 @@
private String getFacesConfigFile(IProject project, IProgressMonitor monitor) {
final IModelProvider provider = PortletCoreActivator
.getModelProvider(project);
- if (isWebApp25(provider.getModelObject())) {
+ if (PortletCoreActivator.isWebApp25(provider.getModelObject())) {
return new JBossWebUtil25().getFacesConfig(project, monitor);
}
return new JBossWebUtil().getFacesConfig(project, monitor);
}
-
- private void configureWebApp(final IProject project,
- final IProgressMonitor monitor, final IDataModel config) {
- final IModelProvider provider = PortletCoreActivator
- .getModelProvider(project);
- IPath modelPath = new Path("WEB-INF").append("web.xml"); //$NON-NLS-1$ //$NON-NLS-2$
- boolean exists = project.getProjectRelativePath().append(modelPath)
- .toFile().exists();
- if (isWebApp25(provider.getModelObject()) && !exists) {
- modelPath = IModelProvider.FORCESAVE;
- }
- provider.modify(new Runnable() {
- public void run() {
- IJBossWebUtil util = null;
-
- if (isWebApp25(provider.getModelObject())) {
- util = new JBossWebUtil25();
- } else {
- util = new JBossWebUtil();
- }
- if (addRichfacesLibraries(config, project)) {
-
- String name = "org.ajax4jsf.VIEW_HANDLERS"; //$NON-NLS-1$
- String value = "org.jboss.portletbridge.application.FaceletPortletViewHandler"; //$NON-NLS-1$
- String description = null;
- util.configureContextParam(project, monitor, name, value,
- description);
-
- name = "javax.portlet.faces.renderPolicy"; //$NON-NLS-1$
- value = "ALWAYS_DELEGATE"; //$NON-NLS-1$
- util.configureContextParam(project, monitor, name, value,
- description);
-
- // RichFaces settings
-
-
- name = "org.richfaces.LoadStyleStrategy"; //$NON-NLS-1$
- value = "NONE"; //$NON-NLS-1$
- util.configureContextParam(project, monitor, name, value,
- description);
-
- name = "org.richfaces.LoadScriptStrategy"; //$NON-NLS-1$
- value = "NONE"; //$NON-NLS-1$
- util.configureContextParam(project, monitor, name, value,
- description);
-
- name = "org.ajax4jsf.RESOURCE_URI_PREFIX"; //$NON-NLS-1$
- value = "rfRes"; //$NON-NLS-1$
- util.configureContextParam(project, monitor, name, value,
- description);
-
- String displayName = "Ajax4jsf Filter"; //$NON-NLS-1$
- String filterName = "ajax4jsf"; //$NON-NLS-1$
- String className = "org.ajax4jsf.Filter"; //$NON-NLS-1$
- util.configureFilter(project, monitor, filterName, className,
- displayName, description);
-
- String servletName = util.findJsfServlet(provider
- .getModelObject());
- if (servletName == null) {
- RuntimeException e = new RuntimeException(
- Messages.JSFPortletFacetInstallDelegate_Cannot_find_the_JSF_servlet);
- PortletCoreActivator.log(e);
- throw e;
- }
- util.configureFilterMapping(project, monitor, filterName,
- servletName);
- } else {
- String name = "javax.portlet.faces.renderPolicy"; //$NON-NLS-1$
- String value = "NEVER_DELEGATE"; //$NON-NLS-1$
- String description = null;
- util.configureContextParam(project, monitor, name, value,
- description);
- }
- }
- }, modelPath);
- }
-
- private boolean addRichfacesLibraries(IDataModel config, IProject project) {
- LibraryInstallDelegate libraryDelegate = ( (LibraryInstallDelegate) config.getProperty( IPortletConstants.JSFPORTLET_LIBRARY_PROVIDER_DELEGATE ) );
- if (libraryDelegate != null) {
- ILibraryProvider libraryProvider = libraryDelegate
- .getLibraryProvider();
- String providerId = libraryProvider.getId();
- if (PortletCoreActivator.JSFPORTLETBRIDGE_LIBRARY_PROVIDER.equals(providerId)
- || PortletCoreActivator.JSFPORTLET_LIBRARY_PROVIDER.equals(providerId)) {
- AbstractLibraryProviderInstallOperationConfig libraryConfig = (AbstractLibraryProviderInstallOperationConfig) libraryDelegate.getLibraryProviderOperationConfig(libraryProvider);
-
- boolean isSeamFacet = false;
- try {
- isSeamFacet = FacetedProjectFramework.hasProjectFacet(project, JST_SEAM_FACET);
- } catch (CoreException e) {
- PortletCoreActivator.log(e);
- }
- if (isSeamFacet) {
- return true;
- }
- if (libraryConfig.isAddRichfacesCapabilities()) {
- return true;
- }
- }
-
- }
- return false;
- }
- private void configureClassPath(final IProject project,
- final IProgressMonitor monitor, IDataModel config)
- throws JavaModelException {
-
- String implementationLibrary = config.getStringProperty(IPortletConstants.IMPLEMENTATION_LIBRARY);
- boolean isEPP = config.getBooleanProperty(IPortletConstants.IS_EPP);
-
- if (IPortletConstants.LIBRARIES_PROVIDED_BY_PORTLETBRIDGE.equals(implementationLibrary) || isEPP) {
- addLibrariesFromPortletBridgeRuntime(project,monitor,config);
- } else if (IPortletConstants.LIBRARIES_PROVIDED_BY_SERVER_RUNTIME.equals(implementationLibrary)) {
- addLibrariesFromServerRuntime(project,monitor,config);
- } else if (IPortletConstants.USER_LIBRARY.equals(implementationLibrary)) {
- addUserLibrary(project,monitor,config);
- }
-
- }
-
- private void addUserLibrary(IProject project, IProgressMonitor monitor,
- IDataModel config) throws JavaModelException {
- String userLibraryName = config.getStringProperty(IPortletConstants.USER_LIBRARY_NAME);
- IPath containerPath = new Path(JavaCore.USER_LIBRARY_CONTAINER_ID).append(userLibraryName);
- IJavaProject javaProject = JavaCore.create(project);
- IClasspathAttribute dependencyAttribute = JavaCore.newClasspathAttribute(
- IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY,
- ClasspathDependencyUtil.getDefaultRuntimePath(
- true).toString());
- IClasspathEntry[] oldClasspathEntries = javaProject.getRawClasspath();
- IClasspathEntry[] newClasspathEntries = null;
- for (int i = 0; i < oldClasspathEntries.length; i++) {
- IClasspathEntry entry = oldClasspathEntries[i];
- if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER &&
- containerPath.equals(entry.getPath())) {
- LinkedHashMap<String, IClasspathAttribute> attrs = new LinkedHashMap<String, IClasspathAttribute>();
- for(IClasspathAttribute attr : entry.getExtraAttributes()) {
- attrs.put(attr.getName(), attr);
- }
- attrs.put(dependencyAttribute.getName(), dependencyAttribute);
- IClasspathAttribute[] newAttrs = attrs.values().toArray(new IClasspathAttribute[attrs.size()]);
- entry = JavaCore.newContainerEntry(entry.getPath(), entry.getAccessRules(), newAttrs, entry.isExported());
- oldClasspathEntries[i] = entry;
- newClasspathEntries = oldClasspathEntries;
- break;
- }
- }
- if (newClasspathEntries == null) {
- newClasspathEntries = new IClasspathEntry[oldClasspathEntries.length + 1];
- for (int i = 0; i < oldClasspathEntries.length; i++) {
- newClasspathEntries[i] = oldClasspathEntries[i];
- }
- IClasspathEntry newClasspath = JavaCore.newContainerEntry(containerPath, null,
- new IClasspathAttribute[] { dependencyAttribute }, true);
- newClasspathEntries[oldClasspathEntries.length] = newClasspath;
- }
- javaProject.setRawClasspath(newClasspathEntries, monitor);
- }
-
- private void addLibrariesFromServerRuntime(IProject project,
- IProgressMonitor monitor, IDataModel config) {
- IFacetedProjectWorkingCopy fpwc = (IFacetedProjectWorkingCopy) config.getProperty(IFacetDataModelProperties.FACETED_PROJECT_WORKING_COPY);
-
- org.eclipse.wst.common.project.facet.core.runtime.IRuntime facetRuntime = fpwc.getPrimaryRuntime();
- IRuntime runtime = PortletCoreActivator.getRuntime(facetRuntime);
- IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
- if (jbossRuntime != null) {
- // JBoss Portal server
- IPath jbossLocation = runtime.getLocation();
- IPath configPath = jbossLocation.append(IJBossServerConstants.SERVER).append(jbossRuntime.getJBossConfiguration());
- IPath portletLib = configPath.append(IPortletConstants.PORTLET_SAR_LIB);
- File portletLibFile = portletLib.toFile();
- String[] files = getPortletbridgeLibraries(portletLibFile);
- if (files == null) {
- portletLib = configPath.append(IPortletConstants.PORTLET_SAR_HA_LIB);
- portletLibFile = portletLib.toFile();
- files = getPortletbridgeLibraries(portletLibFile);
-
- }
- if (files != null) {
- try {
- List<File> filesToImport = new ArrayList<File>();
-
- for (int i = 0; i < files.length; i++) {
- filesToImport.add(new File(portletLibFile, files[i]));
- }
- IVirtualComponent component = ComponentCore
- .createComponent(project);
- IVirtualFile libVirtualFile = component.getRootFolder()
- .getFile(IPortletConstants.WEB_INF_LIB);
-
- IFile folder = libVirtualFile.getUnderlyingFile();
-
- File sourceFolder = new File(portletLib.toOSString());
- ImportOperation importOperation = new ImportOperation(
- folder.getFullPath(), sourceFolder,
- FileSystemStructureProvider.INSTANCE,
- PortletCoreActivator.OVERWRITE_ALL_QUERY,
- filesToImport);
- importOperation.setCreateContainerStructure(false);
- importOperation.run(monitor);
- } catch (Exception e) {
- PortletCoreActivator
- .log(e, Messages.JSFPortletFacetInstallDelegate_Error_loading_classpath_container);
- }
- }
- }
-
- }
-
- private String[] getPortletbridgeLibraries(File file) {
- if (file != null && file.isDirectory()) {
- String[] list = file.list(new FilenameFilter() {
-
- public boolean accept(File dir, String name) {
- if ("portletbridge-api.jar".equals(name) || //$NON-NLS-1$
- "portletbridge-impl.jar".equals(name)) { //$NON-NLS-1$
- return true;
- }
- return false;
- }
-
- });
- return list;
- }
- return null;
- }
- private void addLibrariesFromPortletBridgeRuntime(IProject project,
- IProgressMonitor monitor, IDataModel config) {
- try {
-
- String pbRuntime = config
- .getStringProperty(IPortletConstants.PORTLET_BRIDGE_RUNTIME);
- if (pbRuntime != null && pbRuntime.trim().length() > 0) {
- pbRuntime = pbRuntime.trim();
- File pbFolder = new File(pbRuntime);
- if (pbFolder.exists() && pbFolder.isDirectory()) {
- String[] fileList = pbFolder.list(new FilenameFilter() {
-
- public boolean accept(File dir, String name) {
- if (name.startsWith("portletbridge") || name.endsWith(".jar")) { //$NON-NLS-1$ //$NON-NLS-2$
- return true;
- }
- return false;
- }
-
- });
-
- List<File> filesToImport = new ArrayList<File>();
-
- for (int i = 0; i < fileList.length; i++) {
- filesToImport.add(new File(pbRuntime, fileList[i]));
- }
- IVirtualComponent component = ComponentCore
- .createComponent(project);
- IVirtualFile libVirtualFile = component.getRootFolder()
- .getFile(IPortletConstants.WEB_INF_LIB);
-
- IFile folder = libVirtualFile.getUnderlyingFile();
-
- ImportOperation importOperation = new ImportOperation(
- folder.getFullPath(), pbFolder,
- FileSystemStructureProvider.INSTANCE,
- PortletCoreActivator.OVERWRITE_ALL_QUERY,
- filesToImport);
- importOperation.setCreateContainerStructure(false);
- importOperation.run(monitor);
- }
- }
- } catch (Exception e) {
- PortletCoreActivator
- .log(e, Messages.JSFPortletFacetInstallDelegate_Error_loading_classpath_container);
- }
- }
-
- private boolean isWebApp25(final Object webApp) {
- if (webApp instanceof WebApp
- && ((WebApp) webApp).getVersion() == WebAppVersionType._25_LITERAL)
- return true;
- return false;
- }
-
private class FacesState {
private boolean applicationExists = false;
private boolean viewHandlerExists = false;
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java 2011-01-25 15:11:45 UTC (rev 28599)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java 2011-01-25 16:12:23 UTC (rev 28600)
@@ -9,6 +9,9 @@
import java.util.Enumeration;
import java.util.List;
import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
@@ -19,6 +22,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
@@ -29,6 +33,7 @@
import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifestImpl;
import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.jst.j2ee.model.IModelProvider;
import org.eclipse.ui.dialogs.IOverwriteQuery;
import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
import org.eclipse.ui.wizards.datatransfer.ImportOperation;
@@ -37,6 +42,7 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -47,7 +53,10 @@
import org.eclipse.wst.server.core.IRuntime;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.tools.portlet.core.IJBossWebUtil;
import org.jboss.tools.portlet.core.IPortletConstants;
+import org.jboss.tools.portlet.core.JBossWebUtil;
+import org.jboss.tools.portlet.core.JBossWebUtil25;
import org.jboss.tools.portlet.core.Messages;
import org.jboss.tools.portlet.core.PortletCoreActivator;
import org.jboss.tools.portlet.core.libprov.AbstractLibraryProviderInstallOperationConfig;
@@ -55,7 +64,9 @@
public class PortletPostInstallListener implements IFacetedProjectListener {
- private static final IProjectFacet seamFacet = ProjectFacetsManager.getProjectFacet("jst.seam"); //$NON-NLS-1$
+ private static final String JST_SEAM_FACET = "jst.seam"; //$NON-NLS-1$
+
+ private static final IProjectFacet seamFacet = ProjectFacetsManager.getProjectFacet(JST_SEAM_FACET);
private static final IOverwriteQuery OVERWRITE_NONE_QUERY = new IOverwriteQuery()
{
public String queryOverwrite(String pathString)
@@ -136,9 +147,158 @@
else if (richfacesFromServerRuntime) {
addLibrariesFromServerRuntime(facetedProject);
}
+ configureWebApp(facetedProject.getProject(), new NullProgressMonitor());
}
}
+ private void configureWebApp(final IProject project,
+ final IProgressMonitor monitor) {
+ final IModelProvider provider = PortletCoreActivator
+ .getModelProvider(project);
+ IPath modelPath = new Path("WEB-INF").append("web.xml"); //$NON-NLS-1$ //$NON-NLS-2$
+ boolean exists = project.getProjectRelativePath().append(modelPath)
+ .toFile().exists();
+ if (PortletCoreActivator.isWebApp25(provider.getModelObject()) && !exists) {
+ modelPath = IModelProvider.FORCESAVE;
+ }
+ provider.modify(new Runnable() {
+ public void run() {
+ IJBossWebUtil util = null;
+
+ if (PortletCoreActivator.isWebApp25(provider.getModelObject())) {
+ util = new JBossWebUtil25();
+ } else {
+ util = new JBossWebUtil();
+ }
+ if (addRichfacesLibraries(project)) {
+
+ String name = "org.ajax4jsf.VIEW_HANDLERS"; //$NON-NLS-1$
+ String value = "org.jboss.portletbridge.application.FaceletPortletViewHandler"; //$NON-NLS-1$
+ String description = null;
+ util.configureContextParam(project, monitor, name, value,
+ description);
+
+ name = "javax.portlet.faces.renderPolicy"; //$NON-NLS-1$
+ value = "ALWAYS_DELEGATE"; //$NON-NLS-1$
+ util.configureContextParam(project, monitor, name, value,
+ description);
+
+ // RichFaces settings
+
+ int portletBridgeVersion = getPortletBridgeVersion(project);
+ if (portletBridgeVersion <= 1) {
+ value = "NONE"; //$NON-NLS-1$
+ } else {
+ value = "ALL"; //$NON-NLS-1$
+ }
+ name = "org.richfaces.LoadStyleStrategy"; //$NON-NLS-1$
+ util.configureContextParam(project, monitor, name, value,
+ description);
+
+ name = "org.richfaces.LoadScriptStrategy"; //$NON-NLS-1$
+
+ util.configureContextParam(project, monitor, name, value,
+ description);
+
+ name = "org.ajax4jsf.RESOURCE_URI_PREFIX"; //$NON-NLS-1$
+ value = "rfRes"; //$NON-NLS-1$
+ util.configureContextParam(project, monitor, name, value,
+ description);
+
+ String displayName = "Ajax4jsf Filter"; //$NON-NLS-1$
+ String filterName = "ajax4jsf"; //$NON-NLS-1$
+ String className = "org.ajax4jsf.Filter"; //$NON-NLS-1$
+ util.configureFilter(project, monitor, filterName, className,
+ displayName, description);
+
+ String servletName = util.findJsfServlet(provider
+ .getModelObject());
+ if (servletName == null) {
+ RuntimeException e = new RuntimeException(
+ Messages.JSFPortletFacetInstallDelegate_Cannot_find_the_JSF_servlet);
+ PortletCoreActivator.log(e);
+ throw e;
+ }
+ util.configureFilterMapping(project, monitor, filterName,
+ servletName);
+ } else {
+ String name = "javax.portlet.faces.renderPolicy"; //$NON-NLS-1$
+ String value = "NEVER_DELEGATE"; //$NON-NLS-1$
+ String description = null;
+ util.configureContextParam(project, monitor, name, value,
+ description);
+ }
+ }
+ }, modelPath);
+ }
+
+ protected int getPortletBridgeVersion(IProject project) {
+ if (project == null || !project.isOpen()) {
+ return 0;
+ }
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IVirtualFolder rootFolder = component.getRootFolder();
+ IContainer folder = rootFolder.getUnderlyingFolder();
+ IContainer webinf = folder.getFolder(new Path(IPortletConstants.WEB_INF_LIB));
+ String libResource = webinf.getLocation().toOSString();
+ File libFile = new File(libResource);
+ if (!libFile.exists()) {
+ return 0;
+ }
+ File[] files = libFile.listFiles(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ if (name != null && name.startsWith("portletbridge-api") //$NON-NLS-1$
+ && name.endsWith(".jar")) { //$NON-NLS-1$
+ return true;
+ }
+ return false;
+ }
+ });
+ if (files == null || files.length <= 0) {
+ return 0;
+ }
+ File jarFile = files[0];
+ if(jarFile.isFile()) {
+ try {
+ JarFile jar = new JarFile(jarFile);
+ Attributes attributes = jar.getManifest().getMainAttributes();
+ String versionString = attributes.getValue("Implementation-Version"); //$NON-NLS-1$
+ if (versionString != null && versionString.trim().length() > 0) {
+ StringTokenizer tokenizer = new StringTokenizer(versionString,"."); //$NON-NLS-1$
+ if (tokenizer.hasMoreTokens()) {
+ String firstNumber = tokenizer.nextToken();
+ int version = 0;
+ try {
+ version = new Integer(firstNumber).intValue();
+ } catch (NumberFormatException e) {
+ // ignore
+ }
+ return version;
+ }
+ }
+
+ } catch (IOException e) {
+ return 0;
+ }
+ }
+ return 0;
+ }
+
+ private boolean addRichfacesLibraries(IProject project) {
+ boolean isSeamFacet = false;
+ try {
+ isSeamFacet = FacetedProjectFramework.hasProjectFacet(project,
+ JST_SEAM_FACET);
+ } catch (CoreException e) {
+ PortletCoreActivator.log(e);
+ }
+ if (isSeamFacet) {
+ return true;
+ }
+ return richfacesCapabilities;
+ }
+
private void addLibrariesFromServerRuntime(IFacetedProject facetedProject) {
final boolean isSeamProject = facetedProject.hasProjectFacet(seamFacet);
final boolean addRichfacesFromRichfacesRuntime = richfacesCapabilities && IPortletConstants.LIBRARIES_PROVIDED_BY_RICHFACES.equals(richfacesType) && !isEPP;
13 years, 5 months
JBoss Tools SVN: r28599 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-25 10:11:45 -0500 (Tue, 25 Jan 2011)
New Revision: 28599
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java
Log:
[JBIDE-8173] url encode all parameter values
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java 2011-01-25 15:06:27 UTC (rev 28598)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java 2011-01-25 15:11:45 UTC (rev 28599)
@@ -51,7 +51,7 @@
// WORKAROUND for JBIDE-8005, STEAM-303
.parameter("key_name", keyname)
// WORKAROUND for JBIDE-8005, STEAM-303
- .urlEncodedParameter("name", name)
+ .parameter("name", name)
.parameter("image_id", imageId)
.parameter("hwp_id", profileId)
.parameter("realm_id", realmId)
13 years, 5 months
JBoss Tools SVN: r28598 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-01-25 10:06:27 -0500 (Tue, 25 Jan 2011)
New Revision: 28598
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java
Log:
https://issues.jboss.org/browse/JBIDE-7635
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-01-25 14:54:54 UTC (rev 28597)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-01-25 15:06:27 UTC (rev 28598)
@@ -105,6 +105,7 @@
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_REMOVE_ALL;
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_CREATE_NEW_QUALIFIER;
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_SET_IS_NOT_UNIQUE;
+ public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_ENTER_QUALIFIER_NAME;
public static String CDI_GENERATE_BEANS_XML;
public static String CDI_INSTALL_WIZARD_PAGE_FACET;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-01-25 14:54:54 UTC (rev 28597)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-01-25 15:06:27 UTC (rev 28598)
@@ -89,6 +89,7 @@
ADD_QUALIFIERS_TO_BEAN_WIZARD_REMOVE_ALL=<< Remove All
ADD_QUALIFIERS_TO_BEAN_WIZARD_CREATE_NEW_QUALIFIER=Create New Qualifier
ADD_QUALIFIERS_TO_BEAN_WIZARD_SET_IS_NOT_UNIQUE=This set of qualifiers is not unique
+ADD_QUALIFIERS_TO_BEAN_WIZARD_ENTER_QUALIFIER_NAME=Enter CDI Qualifier name prefix or pattern (? = any character, * = any string):
CDI_GENERATE_BEANS_XML=Generate beans.xml file:
CDI_INSTALL_WIZARD_PAGE_FACET=Context and Dependency Injection (CDI) Facet
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java 2011-01-25 14:54:54 UTC (rev 28597)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java 2011-01-25 15:06:27 UTC (rev 28598)
@@ -25,11 +25,14 @@
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Font;
@@ -43,7 +46,9 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.internal.Workbench;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SearchPattern;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IQualifier;
@@ -57,6 +62,7 @@
private IBean bean;
private java.util.List<IBean> beans;
private WizardPage wizard;
+ private Text pattern;
// original qualifiers on the bean
private ArrayList<IQualifier> originalQualifiers = new ArrayList<IQualifier>();
@@ -220,6 +226,26 @@
new Object[]{bean.getBeanClass().getElementName()}));
Label label = new Label(this, SWT.NONE);
+ label.setText(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_ENTER_QUALIFIER_NAME);
+ label.setLayoutData(data);
+
+ pattern = new Text(this, SWT.BORDER);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ pattern.setLayoutData(data);
+ pattern.addModifyListener(new ModifyListener(){
+ public void modifyText(ModifyEvent e){
+ availableListViewer.refresh();
+ }
+ });
+ pattern.setFocus();
+
+ label = new Label(this, SWT.NONE);
+ label.setText("");
+
+ label = new Label(this, SWT.NONE);
+ label.setText("");
+
+ label = new Label(this, SWT.NONE);
label.setText(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_AVAILABLE);
label = new Label(this, SWT.NONE);
@@ -264,6 +290,7 @@
add(false);
}
});
+ availableListViewer.addFilter(new QualifierFilter());
Composite comp = new Composite(this, SWT.NONE);
data = new GridData(GridData.FILL_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL);
@@ -354,11 +381,11 @@
createQualifier.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
- Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
NewQualifierCreationWizard wizard = new NewQualifierCreationWizard();
StructuredSelection selection = new StructuredSelection(new Object[]{bean.getBeanClass()});
- wizard.init(Workbench.getInstance(), selection);
+ wizard.init(PlatformUI.getWorkbench(), selection);
WizardDialog dialog = new WizardDialog(shell, wizard);
int status = dialog.open();
if(status == WizardDialog.OK){
@@ -379,7 +406,7 @@
});
setEnablement();
- availableList.setFocus();
+ //availableList.setFocus();
Dialog.applyDialogFont(this);
}
@@ -599,4 +626,36 @@
}
}
+
+ public class QualifierFilter extends ViewerFilter {
+ SearchPattern patternMatcher = new SearchPattern();
+ public boolean isConsistentItem(Object item) {
+ return true;
+ }
+
+ public boolean select(Viewer viewer, Object parentElement,
+ Object element) {
+
+ if (element instanceof IQualifier) {
+ String qualifierTypeName = ((IQualifier)element).getSourceType().getFullyQualifiedName();
+ if(pattern.getText().isEmpty())
+ patternMatcher.setPattern("*");
+ else
+ patternMatcher.setPattern(pattern.getText());
+ boolean result = patternMatcher.matches(qualifierTypeName);
+ if (!result) {
+ String pattern = patternMatcher.getPattern();
+ if (pattern.indexOf(".") < 0) {
+ int lastIndex = qualifierTypeName.lastIndexOf(".");
+ if (lastIndex >= 0
+ && (lastIndex + 1) < qualifierTypeName.length())
+ return patternMatcher.matches(qualifierTypeName.substring(lastIndex + 1));
+ }
+ }
+ return result;
+ }
+ return false;
+ }
+ }
+
}
\ No newline at end of file
13 years, 5 months
JBoss Tools SVN: r28597 - trunk/forge/plugins/org.jboss.tools.seam.forge.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-01-25 09:54:54 -0500 (Tue, 25 Jan 2011)
New Revision: 28597
Modified:
trunk/forge/plugins/org.jboss.tools.seam.forge/build.properties
Log:
include icons
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/build.properties
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/build.properties 2011-01-25 14:12:54 UTC (rev 28596)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/build.properties 2011-01-25 14:54:54 UTC (rev 28597)
@@ -3,4 +3,5 @@
bin.includes = META-INF/,\
plugin.xml,\
bin/,\
- lib/
+ lib/,\
+ icons/
13 years, 5 months
JBoss Tools SVN: r28596 - in trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge: view and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-01-25 09:12:54 -0500 (Tue, 25 Jan 2011)
New Revision: 28596
Modified:
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/InputReadJob.java
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleView.java
Log:
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/InputReadJob.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/InputReadJob.java 2011-01-25 14:03:03 UTC (rev 28595)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/InputReadJob.java 2011-01-25 14:12:54 UTC (rev 28596)
@@ -37,4 +37,5 @@
}
return Status.OK_STATUS;
}
+
}
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleView.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleView.java 2011-01-25 14:03:03 UTC (rev 28595)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleView.java 2011-01-25 14:12:54 UTC (rev 28596)
@@ -71,7 +71,6 @@
@Override
public void propertyChange(PropertyChangeEvent evt) {
- if (evt.getNewValue().equals(evt.getOldValue())) return;
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
13 years, 5 months
JBoss Tools SVN: r28595 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-01-25 09:03:03 -0500 (Tue, 25 Jan 2011)
New Revision: 28595
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
Log:
JBIDE-8181 Examples Dialog default layout shows project examples tree as one line
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2011-01-25 13:28:16 UTC (rev 28594)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2011-01-25 14:03:03 UTC (rev 28595)
@@ -75,7 +75,7 @@
*/
public class NewProjectExamplesWizardPage extends WizardPage {
- private static final int DEFAULT_HEIGHT = 350;
+ private static final int DEFAULT_HEIGHT = 400;
private static final int DEFAULT_WIDTH = 600;
private IStructuredSelection selection;
private Button showQuickFixButton;
13 years, 5 months
JBoss Tools SVN: r28594 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: uiutils/actions and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2011-01-25 08:28:16 -0500 (Tue, 25 Jan 2011)
New Revision: 28594
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardType.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
Log:
update tests to 3.2cr1
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-01-25 13:18:53 UTC (rev 28593)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-01-25 13:28:16 UTC (rev 28594)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * 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,
@@ -17,10 +17,21 @@
import org.junit.runners.Suite.SuiteClasses;
/**
+ * This test suite requires JBoss AS 6 or newer
+ *
* System properties:
* -Dswtbot.test.properties.file=$PATH
* -Dusage_reporting_enabled=$BOOLEAN
*
+ * Format of swtbot.properties file:
+ * SERVER=EAP|JBOSS_AS,<server version>,<jre version to run with>|default,<server home>
+ *
+ * Sample swtbot.properties file:
+ *
+ * SERVER=JBOSS_AS,6.0,default,/home/lukas/latest/jboss-6.0.0.Final
+ * JAVA=1.6,/space/java/sdk/jdk1.6.0_22
+ *
+ *
* Suite duration: aprox. 3min
*
* @author Lukas Jungmann
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java 2011-01-25 13:18:53 UTC (rev 28593)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java 2011-01-25 13:28:16 UTC (rev 28594)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * 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,
@@ -11,31 +11,19 @@
package org.jboss.tools.cdi.bot.test.uiutils.actions;
import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.results.Result;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
public abstract class Action<T> {
private final SWTBotExt bot = new SWTBotExt();
private final String[] actionPath;
- private final String[] nodePath;
- private final SWTBotTree tree;
public Action(String... path) {
- this(null, null, path);
+ assert path.length > 0;
+ this.actionPath = path;
}
- public Action(SWTBotTree tree, String[] nodePath, String... actionPath) {
- assert actionPath.length > 0;
- this.tree = tree;
- this.nodePath = nodePath;
- this.actionPath = actionPath;
- }
-
public abstract T run();
protected SWTBot performMenu() {
@@ -47,20 +35,7 @@
return new SWTBot();
}
- protected SWTBot pepformPopup() {
- assert tree != null : "Tree cannot be null!";
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, tree.expandNode(nodePath));
- UIThreadRunnable.syncExec(new Result<SWTBotMenu>() {
-
- public SWTBotMenu run() {
- SWTBotMenu m = new SWTBotMenu(ContextMenuHelper.getContextMenu(
- tree, actionPath[0], false));
- for (int i = 1; i < actionPath.length; i++) {
- m = m.menu(actionPath[i]);
- }
- return m;
- }
- }).click();
- return new SWTBot();
+ protected String[] getActionPath() {
+ return actionPath;
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java 2011-01-25 13:18:53 UTC (rev 28593)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java 2011-01-25 13:28:16 UTC (rev 28594)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * 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,
@@ -26,7 +26,7 @@
@Override
public CDIWizard run() {
Wizard w = super.run();
- w.selectTemplate("CDI", type.getAnnotationType());
+ w.selectTemplate("CDI (Context and Dependency Injection)", type.getAnnotationType());
w.next();
return new CDIWizard(type);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardType.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardType.java 2011-01-25 13:18:53 UTC (rev 28593)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardType.java 2011-01-25 13:28:16 UTC (rev 28594)
@@ -11,8 +11,11 @@
package org.jboss.tools.cdi.bot.test.uiutils.wizards;
public enum CDIWizardType {
- INTERCEPTOR_BINDING, QUALIFIER, SCOPE, STEREOTYPE, DECORATOR, INTERCEPTOR;
+ INTERCEPTOR_BINDING, QUALIFIER, SCOPE, STEREOTYPE,
+ DECORATOR, INTERCEPTOR, BEAN, ANNOTATION_LITERAL,
+ BEANS_XML;
+
String getName() {
switch (this) {
case INTERCEPTOR_BINDING:
@@ -27,13 +30,19 @@
return "Decorator";
case INTERCEPTOR:
return "Interceptor";
+ case BEAN:
+ return "Bean";
+ case ANNOTATION_LITERAL:
+ return "Annotation Literal";
+ case BEANS_XML:
+ return "File beans.xml";
default:
throw new AssertionError("Unknown type");
}
}
public String getAnnotationType() {
- return isAnnotation() ? getName() + " Annotation Type" : getName() + " Type";
+ return isAnnotation() ? getName() + " Annotation" : getName();
}
private boolean isAnnotation() {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-01-25 13:18:53 UTC (rev 28593)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-01-25 13:28:16 UTC (rev 28594)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * 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,
@@ -67,7 +67,7 @@
t.expand();
// Configure Add CDI Support...
- nodeContextMenu(tree, t, "Configure", "Add CDI support...").click();
+ nodeContextMenu(tree, t, "Configure", "Add CDI (Context and Dependency Injection) support...").click();
bot.activeShell().bot().button("OK").click();
util.waitForNonIgnoredJobs();
}
13 years, 5 months