JBoss Tools SVN: r35552 - in trunk: jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-10-11 14:30:47 -0400 (Tue, 11 Oct 2011)
New Revision: 35552
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/hover/ELTooltipTest.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/FaceletTagInfoHoverProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/MessagePropertyELSegmentImpl.java
Log:
JBIDE-9731 Tooltip for EL referenced to message bundles
EL Tooltips were added for Resource Bundles/Properties. JUnit test for EL Tooltips is updated
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2011-10-11 18:19:55 UTC (rev 35551)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2011-10-11 18:30:47 UTC (rev 35552)
@@ -56,7 +56,6 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.PositionHolder;
import org.jboss.tools.common.text.TextProposal;
-import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.IResourceBundle;
import org.jboss.tools.jst.web.kb.el.MessagePropertyELSegmentImpl;
import org.jboss.tools.jst.web.kb.internal.ResourceBundle;
@@ -250,16 +249,16 @@
segment.getVariables().add(variable);
}
resolution.addSegment(segment);
- if(left.getLastToken() != left.getFirstToken()) {
- LexicalToken combined = left.getFirstToken().getNextToken().getCombinedToken(left.getLastToken());
- segment = new MessagePropertyELSegmentImpl(combined);
- processMessageBundleSegment(expr, (MessagePropertyELSegmentImpl)segment, resolvedVariables);
- segment.setResolved(true);
- for (Variable variable : resolvedVars) {
- segment.getVariables().add(variable);
- }
- resolution.addSegment(segment);
- }
+// if(left.getLastToken() != left.getFirstToken()) {
+// LexicalToken combined = left.getFirstToken().getNextToken().getCombinedToken(left.getLastToken());
+// segment = new MessagePropertyELSegmentImpl(combined);
+// processMessageBundleSegment(expr, (MessagePropertyELSegmentImpl)segment, resolvedVariables);
+// segment.setResolved(true);
+// for (Variable variable : resolvedVars) {
+// segment.getVariables().add(variable);
+// }
+// resolution.addSegment(segment);
+// }
break;
}
@@ -303,9 +302,6 @@
if (resolution.getLastResolvedToken() == operand) {
// First segment is the last one
Set<TextProposal> proposals = new TreeSet<TextProposal>(TextProposal.KB_PROPOSAL_ORDER);
- ELSegmentImpl segment = new ELSegmentImpl(operand.getFirstToken());
- segment.setResolved(true);
- resolution.addSegment(segment);
for (Variable var : resolvedVariables) {
String varName = var.getName();
@@ -322,7 +318,7 @@
setImage(proposal);
proposals.add(proposal);
}
- segment.getVariables().add(var);
+ resolution.getLastSegment().getVariables().add(var);
}
resolution.setLastResolvedToken(expr);
resolution.setProposals(proposals);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2011-10-11 18:19:55 UTC (rev 35551)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2011-10-11 18:30:47 UTC (rev 35552)
@@ -274,9 +274,6 @@
if (resolution.getLastResolvedToken() == operand) {
// First segment is the last one
Set<TextProposal> proposals = new TreeSet<TextProposal>(TextProposal.KB_PROPOSAL_ORDER);
- ELSegmentImpl segment = new ELSegmentImpl(operand.getFirstToken());
- segment.setResolved(true);
- resolution.addSegment(segment);
for (Variable var : resolvedVariables) {
String varName = var.getName();
@@ -293,7 +290,7 @@
setImage(proposal);
proposals.add(proposal);
}
- segment.getVariables().add(var);
+ resolution.getLastSegment().getVariables().add(var);
}
resolution.setLastResolvedToken(expr);
resolution.setProposals(proposals);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/hover/ELTooltipTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/hover/ELTooltipTest.java 2011-10-11 18:19:55 UTC (rev 35551)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/hover/ELTooltipTest.java 2011-10-11 18:30:47 UTC (rev 35552)
@@ -25,7 +25,7 @@
import org.jboss.tools.test.util.ProjectImportTestSetup;
/**
- * The JUnit test cases for JBIDE-9448 issue
+ * The JUnit test cases for JBIDE-9448, JBIDE-9731 issues
*
* @author Victor Rubezhny
*/
@@ -33,8 +33,14 @@
private static final String PROJECT_NAME = "JSF2KickStartWithoutLibs";
private static final String PAGE_NAME = "WebContent/pages/inputname.xhtml";
- private static final String EL_PREFIX[] = {"value=\"#{user", "value=\"#{user.name", "action=\"#{user.sayHello"};
- private static final String EL_VALUE[] = {"user", "name", "sayHello"};
+ private static final String EL_PREFIX[] = {
+ "value=\"#{user",
+ "value=\"#{user.name",
+ "action=\"#{user.sayHello",
+ "label=\"${msgs",
+ "label=\"${msgs.prompt"
+ };
+ private static final String EL_VALUE[] = {"user", "name", "sayHello", "msgs", "prompt"};
private static final String EL_TOOLTIP_TEXT[] = {
"<html><body text=\"#000000\" bgcolor=\"#ffffe1\"><h5><img style='position: relative; width: 16px; height: 16px; top: 2px; left: 2px; ' src='file:/home/jeremy/projects/junit-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png'>\n" +
"<span style='word-wrap:break-word;margin-left: 2px; margin-top: 2px; '>demo.User</span></span></h5><p>Created by JBoss Tools</body></html>",
@@ -42,7 +48,10 @@
"<span style='word-wrap:break-word;margin-left: 2px; margin-top: 2px; '>void demo.<a class='header' href='eclipse-javadoc:%E2%98%82=JSF2KickStartWithoutLibs/JavaSource%3Cdemo%7BUser.java%E2%98%83User'>User</a>.setName(<a class='header' href='eclipse-javadoc:%E2%98%82=JSF2KickStartWithoutLibs/JavaSource%3Cdemo%7BUser.java%E2%98%83User~setName~QString;%E2%98%82String'>String</a> name)</span></span></h5><br/><h5><img style='position: relative; width: 16px; height: 16px; top: 2px; left: 2px; ' src='file:/home/jeremy/projects/junit-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png'>\n" +
"<span style='word-wrap:break-word;margin-left: 2px; margin-top: 2px; '><a class='header' href='eclipse-javadoc:%E2%98%82=JSF2KickStartWithoutLibs/JavaSource%3Cdemo%7BUser.java%E2%98%83User~getName%E2%98%82String'>String</a> demo.<a class='header' href='eclipse-javadoc:%E2%98%82=JSF2KickStartWithoutLibs/JavaSource%3Cdemo%7BUser.java%E2%98%83User'>User</a>.getName()</span></span></h5></body></html>",
"<html><body text=\"#000000\" bgcolor=\"#ffffe1\"><h5><img style='position: relative; width: 16px; height: 16px; top: 2px; left: 2px; ' src='file:/home/jeremy/projects/junit-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png'>\n" +
- "<span style='word-wrap:break-word;margin-left: 2px; margin-top: 2px; '><a class='header' href='eclipse-javadoc:%E2%98%82=JSF2KickStartWithoutLibs/JavaSource%3Cdemo%7BUser.java%E2%98%83User~sayHello%E2%98%82String'>String</a> demo.<a class='header' href='eclipse-javadoc:%E2%98%82=JSF2KickStartWithoutLibs/JavaSource%3Cdemo%7BUser.java%E2%98%83User'>User</a>.sayHello()</span></span></h5></body></html>"
+ "<span style='word-wrap:break-word;margin-left: 2px; margin-top: 2px; '><a class='header' href='eclipse-javadoc:%E2%98%82=JSF2KickStartWithoutLibs/JavaSource%3Cdemo%7BUser.java%E2%98%83User~sayHello%E2%98%82String'>String</a> demo.<a class='header' href='eclipse-javadoc:%E2%98%82=JSF2KickStartWithoutLibs/JavaSource%3Cdemo%7BUser.java%E2%98%83User'>User</a>.sayHello()</span></span></h5></body></html>",
+ "Base Name: resources<br><br>Resource Bundle: /JSF2KickStartWithoutLibs/JavaSource/resources.properties<br>",
+ "Property: prompt<br>Base Name: resources<br><br>Resource Bundle: /JSF2KickStartWithoutLibs/JavaSource/resources.properties<br>Value: Your Name:<br><br>"
+
};
public void setUp() throws Exception {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.java 2011-10-11 18:19:55 UTC (rev 35551)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.java 2011-10-11 18:30:47 UTC (rev 35552)
@@ -25,7 +25,15 @@
public static String ELInfoHover_noAttachedJavaSource; //
public static String ELInfoHover_noInformation; //
public static String ELInfoHover_error_gettingJavadoc; //
-
+ public static String ELInfoHover_baseName;
+ public static String ELInfoHover_propertyName;
+ public static String ELInfoHover_resourceBundle;
+ public static String ELInfoHover_resourceBundlePropertyValue;
+ public static String ELInfoHover_resourceBundlePropertyValueNotDefined;
+ public static String ELInfoHover_resourceBundleNotDefined;
+ public static String ELInfoHover_newLine;
+ public static String ELInfoHover_treeDots;
+
static {
NLS.initializeMessages(BUNDLE_NAME, ELInfoHoverMessages.class);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties 2011-10-11 18:19:55 UTC (rev 35551)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties 2011-10-11 18:30:47 UTC (rev 35552)
@@ -3,3 +3,11 @@
ELInfoHover_noAttachedJavadoc= <em>Note: This element has no attached Javadoc and the Javadoc could not be found in the attached source.</em>
ELInfoHover_noInformation= <em>Note: The Javadoc for this element could neither be found in the attached source nor the attached Javadoc.</em>
ELInfoHover_error_gettingJavadoc= <em>Note: An exception occurred while getting the Javadoc. See log for details.</em>
+ELInfoHover_baseName=Base Name: {0}<br>
+ELInfoHover_propertyName=Property: {0}<br>
+ELInfoHover_resourceBundle=Resource Bundle: {0}<br>
+ELInfoHover_resourceBundlePropertyValue=Value: {0}{1}<br>
+ELInfoHover_resourceBundlePropertyValueNotDefined=[Value not defined]
+ELInfoHover_resourceBundleNotDefined=[Resource Bundle not defined]
+ELInfoHover_newLine=<br>
+ELInfoHover_treeDots=...
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/FaceletTagInfoHoverProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/FaceletTagInfoHoverProcessor.java 2011-10-11 18:19:55 UTC (rev 35551)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/FaceletTagInfoHoverProcessor.java 2011-10-11 18:30:47 UTC (rev 35552)
@@ -13,11 +13,14 @@
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
+import java.text.MessageFormat;
import java.util.List;
import java.util.Map;
import org.eclipse.core.filebuffers.FileBuffers;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IJavaElement;
@@ -53,6 +56,9 @@
import org.jboss.tools.common.el.core.resolver.ELResolver;
import org.jboss.tools.common.el.core.resolver.ELSegment;
import org.jboss.tools.common.el.core.resolver.JavaMemberELSegmentImpl;
+import org.jboss.tools.common.el.core.resolver.MessagePropertyELSegment;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.impl.JarSystemImpl;
import org.jboss.tools.common.text.TextProposal;
import org.jboss.tools.jst.jsp.contentassist.Utils;
import org.jboss.tools.jst.jsp.contentassist.computers.AbstractXmlCompletionProposalComputer.TextRegion;
@@ -61,6 +67,7 @@
import org.jboss.tools.jst.web.kb.KbQuery.Type;
import org.jboss.tools.jst.web.kb.PageContextFactory;
import org.jboss.tools.jst.web.kb.PageProcessor;
+import org.jboss.tools.jst.web.kb.el.MessagePropertyELSegmentImpl;
import org.jboss.tools.jst.web.kb.taglib.INameSpace;
import org.w3c.dom.Node;
@@ -196,7 +203,7 @@
for (int i = 0; resolvers != null && i < resolvers.length; i++) {
ELResolution resolution = resolvers[i] == null ? null : resolvers[i].resolve(fContext, elOperand, fDocumentPosition);
- if (resolution == null)
+ if (resolution == null || !resolution.isResolved())
continue;
ELSegment segment = resolution.getLastSegment();
@@ -215,6 +222,75 @@
ELInfoHoverBrowserInformationControlInput hover = JavaStringELInfoHover.getHoverInfo2Internal(javaElements, false);
return (hover == null ? null : hover.getHtml());
+ } else if (segment instanceof MessagePropertyELSegmentImpl) {
+ MessagePropertyELSegmentImpl mpSegment = (MessagePropertyELSegmentImpl)segment;
+
+ String baseName = mpSegment.getBaseName();
+ String propertyName = ((MessagePropertyELSegment)segment).isBundle() ? null : trimQuotes(segment.getToken().getText());
+
+ StringBuilder sb = new StringBuilder();
+ if (propertyName != null && propertyName.length() > 0)
+ sb.append(MessageFormat.format(ELInfoHoverMessages.ELInfoHover_propertyName,
+ propertyName));
+
+ if (baseName != null && baseName.length() > 0)
+ sb.append(MessageFormat.format(ELInfoHoverMessages.ELInfoHover_baseName,
+ baseName));
+ sb.append(ELInfoHoverMessages.ELInfoHover_newLine);
+
+ List<XModelObject> objects = (List<XModelObject>)mpSegment.getObjects();
+ for (XModelObject o : objects) {
+ IFile propFile = (IFile)o.getAdapter(IFile.class);
+ String propFilePath = null;
+ if (propFile != null) {
+ propFilePath = propFile.getFullPath().toString();
+ } else {
+ XModelObject parent = o.getFileType() == XModelObject.FILE ? o : o.getParent();
+ String path = parent.getPath();
+ while (parent != null && parent.getFileType() != XModelObject.SYSTEM) {
+ parent = parent.getParent();
+ }
+ if (parent instanceof JarSystemImpl) {
+ String sysPath = parent.getPath();
+ path = path.substring(sysPath.length());
+
+ String jarPath = ((JarSystemImpl) parent).getLocation();
+
+ IResource jar = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(jarPath));
+
+ if (jar != null) {
+ jarPath = jar.getFullPath().toString();
+ }
+
+ propFilePath = jarPath + "!" + path; //$NON-NLS-1$
+ }
+ }
+ sb.append(MessageFormat.format(ELInfoHoverMessages.ELInfoHover_resourceBundle,
+ propFilePath != null ? propFilePath : ELInfoHoverMessages.ELInfoHover_resourceBundleNotDefined));
+
+ if (propertyName != null) {
+ String value = o.get("VALUE"); //$NON-NLS-1$
+ boolean addCut = false;
+ if (value != null) {
+ if (value.length() > 100) {
+ // Get first words of value
+ int lastSpace = value.lastIndexOf(' ', 99);
+ if (lastSpace != -1) {
+ value = value.substring(0, lastSpace);
+ } else { // cut as is
+ value = value.substring(0, 100);
+ }
+ addCut = true;
+ }
+ }
+ sb.append(MessageFormat.format(ELInfoHoverMessages.ELInfoHover_resourceBundlePropertyValue,
+ value != null ? value : ELInfoHoverMessages.ELInfoHover_resourceBundlePropertyValueNotDefined,
+ addCut ? ELInfoHoverMessages.ELInfoHover_treeDots : "")); //$NON-NLS-1$
+ sb.append(ELInfoHoverMessages.ELInfoHover_newLine);
+ }
+ }
+
+ return sb.toString();
}
}
@@ -436,4 +512,18 @@
};
}
+ private String trimQuotes(String value) {
+ if(value == null)
+ return null;
+
+ if(value.startsWith("'") || value.startsWith("\"")) { //$NON-NLS-1$ //$NON-NLS-2$
+ value = value.substring(1);
+ }
+
+ if(value.endsWith("'") || value.endsWith("\"")) { //$NON-NLS-1$ //$NON-NLS-2$
+ value = value.substring(0, value.length() - 1);
+ }
+ return value;
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/MessagePropertyELSegmentImpl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/MessagePropertyELSegmentImpl.java 2011-10-11 18:19:55 UTC (rev 35551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/MessagePropertyELSegmentImpl.java 2011-10-11 18:30:47 UTC (rev 35552)
@@ -100,6 +100,10 @@
objects.add(object);
}
+ public List<XModelObject> getObjects() {
+ return objects;
+ }
+
public IOpenableReference[] getOpenable() {
if(objects != null) {
IOpenableReference[] result = new IOpenableReference[objects.size()];
@@ -114,8 +118,8 @@
@Override
public String getLabel() {
- XModelObject p = o;
- while(p != null && p.getFileType() < XModelObject.FILE) p = p.getParent();
+// XModelObject p = o;
+// while(p != null && p.getFileType() < XModelObject.FILE) p = p.getParent();
// Improve label - add a locale for a resource bundle
String baseName = getBaseName();
14 years, 6 months
JBoss Tools SVN: r35551 - trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-11 14:19:55 -0400 (Tue, 11 Oct 2011)
New Revision: 35551
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
Log:
[JBIDE-9793] connected imported proj to git repo
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11 18:10:05 UTC (rev 35550)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11 18:19:55 UTC (rev 35551)
@@ -22,6 +22,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.egit.core.op.CloneOperation;
+import org.eclipse.egit.core.op.ConnectProviderOperation;
import org.eclipse.egit.ui.Activator;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.api.Git;
@@ -88,7 +89,9 @@
IProject project = workspaceRoot.getProject(projectName);
overwriteExistingProject(project, monitor);
- importToNewProject(projectDirectory, monitor, project);
+ importToNewProject(projectDirectory, project, monitor);
+ conntectToGitRepo(project, monitor);
+
if (isMavenProject(projectDirectory)) {
configureMavenNature(project, monitor);
}
@@ -96,13 +99,17 @@
createServerAdapterIfRequired();
}
+ private void conntectToGitRepo(IProject project, IProgressMonitor monitor) throws CoreException {
+ new ConnectProviderOperation(project).execute(monitor);
+ }
+
private void configureMavenNature(IProject project, IProgressMonitor monitor) throws CoreException {
IProjectConfigurationManager manager = MavenPluginActivator.getDefault().getProjectConfigurationManager();
ResolverConfiguration resolverConfiguration = manager.getResolverConfiguration(project);
manager.enableMavenNature(project, resolverConfiguration, monitor);
}
- private void importToNewProject(File projectDirectory, IProgressMonitor monitor, IProject project)
+ private void importToNewProject(File projectDirectory, IProject project, IProgressMonitor monitor)
throws CoreException, InvocationTargetException, InterruptedException {
project.create(monitor);
project.open(monitor);
14 years, 6 months
JBoss Tools SVN: r35550 - trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-11 14:10:05 -0400 (Tue, 11 Oct 2011)
New Revision: 35550
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
Log:
[JBIDE-9793] adding now maven nature if imported proj is maven proj
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11 17:55:12 UTC (rev 35549)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11 18:10:05 UTC (rev 35550)
@@ -172,7 +172,7 @@
}
private boolean isEclipseProject(File destination) {
- if (isReadable(destination)) {
+ if (!isReadable(destination)) {
return false;
}
@@ -181,7 +181,7 @@
}
private boolean isMavenProject(File destination) {
- if (isReadable(destination)) {
+ if (!isReadable(destination)) {
return false;
}
@@ -189,9 +189,9 @@
}
private boolean isReadable(File destination) {
- return destination == null
- || destination.exists()
- || destination.canRead();
+ return destination != null
+ && destination.exists()
+ && destination.canRead();
}
private File getDestinationDirectory(IApplication application) {
14 years, 6 months
JBoss Tools SVN: r35549 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-11 13:55:12 -0400 (Tue, 11 Oct 2011)
New Revision: 35549
Modified:
trunk/build/target-platform/jbds.target.p2mirror.xml
trunk/build/target-platform/multiple.target.p2mirror.xml
trunk/build/target-platform/unified.target.p2mirror.xml
Log:
add bpel 0.5 to TPs (JBDS-1879)
Modified: trunk/build/target-platform/jbds.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/jbds.target.p2mirror.xml 2011-10-11 17:55:02 UTC (rev 35548)
+++ trunk/build/target-platform/jbds.target.p2mirror.xml 2011-10-11 17:55:12 UTC (rev 35549)
@@ -110,6 +110,9 @@
<iu id="org.eclipse.xsd.mapping.editor.feature.group" version=""/>
<iu id="org.eclipse.xsd.mapping.feature.group" version=""/>
<iu id="org.eclipse.xsd.feature.group" version=""/>
+<iu id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version=""/>
+<iu id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version=""/>
+<iu id="org.eclipse.bpel.feature.feature.group" version=""/>
<iu id="org.eclipse.graphiti.feature.feature.group" version=""/>
<iu id="org.eclipse.emf.feature.group" version=""/>
<iu id="org.eclipse.emf.workspace.feature.group" version=""/>
Modified: trunk/build/target-platform/multiple.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/multiple.target.p2mirror.xml 2011-10-11 17:55:02 UTC (rev 35548)
+++ trunk/build/target-platform/multiple.target.p2mirror.xml 2011-10-11 17:55:12 UTC (rev 35549)
@@ -70,6 +70,9 @@
<iu id="org.apache.lucene.queries" version=""/>
<iu id="org.apache.lucene.snowball" version=""/>
<iu id="org.apache.lucene.spellchecker" version=""/>
+<iu id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version=""/>
+<iu id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version=""/>
+<iu id="org.eclipse.bpel.feature.feature.group" version=""/>
<iu id="org.eclipse.graphiti.feature.feature.group" version=""/>
<iu id="org.eclipse.emf.workspace.feature.group" version=""/>
<iu id="org.eclipse.emf.validation.feature.group" version=""/>
Modified: trunk/build/target-platform/unified.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/unified.target.p2mirror.xml 2011-10-11 17:55:02 UTC (rev 35548)
+++ trunk/build/target-platform/unified.target.p2mirror.xml 2011-10-11 17:55:12 UTC (rev 35549)
@@ -69,6 +69,9 @@
<iu id="org.apache.lucene.queries" version=""/>
<iu id="org.apache.lucene.snowball" version=""/>
<iu id="org.apache.lucene.spellchecker" version=""/>
+<iu id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version=""/>
+<iu id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version=""/>
+<iu id="org.eclipse.bpel.feature.feature.group" version=""/>
<iu id="org.eclipse.graphiti.feature.feature.group" version=""/>
<iu id="org.eclipse.emf.workspace.feature.group" version=""/>
<iu id="org.eclipse.emf.validation.feature.group" version=""/>
14 years, 6 months
JBoss Tools SVN: r35548 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-11 13:55:02 -0400 (Tue, 11 Oct 2011)
New Revision: 35548
Modified:
trunk/build/target-platform/jbds.target
trunk/build/target-platform/multiple.target
trunk/build/target-platform/unified.target
Log:
add bpel 0.5 to TPs (JBDS-1879)
Modified: trunk/build/target-platform/jbds.target
===================================================================
--- trunk/build/target-platform/jbds.target 2011-10-11 17:49:07 UTC (rev 35547)
+++ trunk/build/target-platform/jbds.target 2011-10-11 17:55:02 UTC (rev 35548)
@@ -54,6 +54,11 @@
<unit id="org.eclipse.mylyn.commons.screenshots" version="3.6.0.v20110608-1400"/>
<unit id="org.apache.commons.lang" version="2.4.0.v201005080502"/>
+ <!-- Eclipse BPEL features -->
+ <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+
<!-- Orbit bundles needed for Eclipse Checkstyle (eclipse-cs) -->
<unit id="org.apache.lucene.highlighter" version="2.9.1.v20100421-0704"/>
<unit id="org.apache.lucene.memory" version="2.9.1.v20100421-0704"/>
Modified: trunk/build/target-platform/multiple.target
===================================================================
--- trunk/build/target-platform/multiple.target 2011-10-11 17:49:07 UTC (rev 35547)
+++ trunk/build/target-platform/multiple.target 2011-10-11 17:55:02 UTC (rev 35548)
@@ -64,6 +64,11 @@
<unit id="org.apache.lucene.snowball" version="2.9.1.v20100421-0704"/>
<unit id="org.apache.lucene.spellchecker" version="2.9.1.v20100421-0704"/>
+ <!-- Eclipse BPEL features -->
+ <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+
<unit id="org.eclipse.graphiti.feature.feature.group" version="0.8.0.v20110607-1252"/>
<unit id="org.eclipse.emf.workspace.feature.group" version="1.5.0.v20110502-1600-36-8s734C367E3CBC7"/>
<unit id="org.eclipse.emf.validation.feature.group" version="1.5.0.v20110502-1600-479-9oB56N5BBR6LCA6"/>
Modified: trunk/build/target-platform/unified.target
===================================================================
--- trunk/build/target-platform/unified.target 2011-10-11 17:49:07 UTC (rev 35547)
+++ trunk/build/target-platform/unified.target 2011-10-11 17:55:02 UTC (rev 35548)
@@ -64,6 +64,11 @@
<unit id="org.apache.lucene.snowball" version="2.9.1.v20100421-0704"/>
<unit id="org.apache.lucene.spellchecker" version="2.9.1.v20100421-0704"/>
+ <!-- Eclipse BPEL features -->
+ <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+
<unit id="org.eclipse.graphiti.feature.feature.group" version="0.8.0.v20110607-1252"/>
<unit id="org.eclipse.emf.workspace.feature.group" version="1.5.0.v20110502-1600-36-8s734C367E3CBC7"/>
<unit id="org.eclipse.emf.validation.feature.group" version="1.5.0.v20110502-1600-479-9oB56N5BBR6LCA6"/>
14 years, 6 months
JBoss Tools SVN: r35547 - trunk/bpel.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-11 13:49:07 -0400 (Tue, 11 Oct 2011)
New Revision: 35547
Modified:
trunk/bpel/pom.xml
Log:
JBDS-1879 get bpel upstream deps from jbt comp reqs site from now on
Modified: trunk/bpel/pom.xml
===================================================================
--- trunk/bpel/pom.xml 2011-10-11 17:49:00 UTC (rev 35546)
+++ trunk/bpel/pom.xml 2011-10-11 17:49:07 UTC (rev 35547)
@@ -18,29 +18,5 @@
<module>site</module>
<module>tests</module>
</modules>
- <repositories>
- <repository>
- <id>eclipse-bpel-milestone</id>
- <url>http://download.eclipse.org/bpel/update-site/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>eclipse-bpel-nightly</id>
- <url>https://hudson.eclipse.org/hudson/job/bpel-0.5/lastSuccessfulBuild/artifa...</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
</project>
14 years, 6 months
JBoss Tools SVN: r35546 - in trunk/download.jboss.org/jbosstools/updates: requirements and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-11 13:49:00 -0400 (Tue, 11 Oct 2011)
New Revision: 35546
Added:
trunk/download.jboss.org/jbosstools/updates/requirements/bpel/
trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml
Modified:
trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeArtifacts...
trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeContent.xml
Log:
JBDS-1879 mirror bpel 0.5 onto dl.jb.o as new req
Modified: trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeArtifacts...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeArtifacts... 2011-10-11 16:55:10 UTC (rev 35545)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeArtifacts... 2011-10-11 17:49:00 UTC (rev 35546)
@@ -3,22 +3,23 @@
<repository name='JBoss Tools Requirements - Composite Indigo SR1 Mirror' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1317877554000'/>
+<property name='p2.timestamp' value='1318354979000'/>
</properties>
-<children size='13'>
+<children size='14'>
<child location='../../requirements/indigo/201109230900-SR1/'/>
<child location='../../requirements/birt/3.7.1/'/>
+<child location='../../requirements/bpel/0.5.0-20110915-1141-H87/'/>
<child location='../../requirements/ecf/3.5.2/'/>
<child location='../../requirements/eclipse/3.7.1/'/>
+
<child location='../../requirements/egit/1.0.0/'/>
-
<child location='../../requirements/emf/2.7.1/'/>
<!-- includes m2e, m2e-extras, m2e-wtp -->
<child location='../../requirements/m2eclipse/20111005-1500/'/>
<child location='../../requirements/mylyn/3.6.2-v20110908-0706/'/>
<child location='../../requirements/orbit/R20110523182458/'/>
+
<child location='../../requirements/swtbot/2.0.5/'/>
-
<child location='../../requirements/webtools/3.3.1-20110915193224/'/>
<child location='../../requirements/xulrunner-1.9.2/'/>
<child location='http://dl.google.com/eclipse/plugin/3.7/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeContent.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeContent.xml 2011-10-11 16:55:10 UTC (rev 35545)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeContent.xml 2011-10-11 17:49:00 UTC (rev 35546)
@@ -3,22 +3,23 @@
<repository name='JBoss Tools Requirements - Composite Indigo SR1 Mirror' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1317877554000'/>
+<property name='p2.timestamp' value='1318354979000'/>
</properties>
-<children size='13'>
+<children size='14'>
<child location='../../requirements/indigo/201109230900-SR1/'/>
<child location='../../requirements/birt/3.7.1/'/>
+<child location='../../requirements/bpel/0.5.0-20110915-1141-H87/'/>
<child location='../../requirements/ecf/3.5.2/'/>
<child location='../../requirements/eclipse/3.7.1/'/>
+
<child location='../../requirements/egit/1.0.0/'/>
-
<child location='../../requirements/emf/2.7.1/'/>
<!-- includes m2e, m2e-extras, m2e-wtp -->
<child location='../../requirements/m2eclipse/20111005-1500/'/>
<child location='../../requirements/mylyn/3.6.2-v20110908-0706/'/>
<child location='../../requirements/orbit/R20110523182458/'/>
+
<child location='../../requirements/swtbot/2.0.5/'/>
-
<child location='../../requirements/webtools/3.3.1-20110915193224/'/>
<child location='../../requirements/xulrunner-1.9.2/'/>
<child location='http://dl.google.com/eclipse/plugin/3.7/'/>
Added: trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml 2011-10-11 17:49:00 UTC (rev 35546)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="mirror">
+ <!-- run locally in Eclipse (to resolve p2 tasks) using these commandline options:
+
+ -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
+ -consoleLog -nosplash -data /tmp
+ -application org.eclipse.ant.core.antRunner
+ -f "/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/bpel/build-indigo.xml"
+
+ or, run headless on qa01 server, where Eclipse is installed into ~/eclipse:
+
+ export JAVA_HOME=/opt/jdk1.6.0; \
+ ${JAVA_HOME}/bin/java -cp ~/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
+ org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
+ -application org.eclipse.ant.core.antRunner \
+ -f ~/RHDS/updates/requirements/bpel/build-indigo.xml -Ddestination=/tmp/bpel-repo
+
+ or, headless on local:
+
+ java -cp /home/nboldt/eclipse/eclipse361/plugins/org.eclipse.equinox.launcher_*.jar \
+ org.eclipse.equinox.launcher.Main -consoleLog -nosplash -data /tmp \
+ -application org.eclipse.ant.core.antRunner -f build-indigo.xml
+
+ -->
+ <target name="mirror">
+ <property name="URL1" value="http://download.eclipse.org/bpel/update-site/" />
+ <property name="URL2" value="https://hudson.eclipse.org/hudson/job/bpel-0.5/lastSuccessfulBuild/artifa..." />
+ <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/bpel/" />
+ <property name="compress" value="true" />
+
+ <p2.mirror>
+ <repository location="file:${destination}/0.5.0-20110915-1141-H87/" name="Eclipse BPEL for Eclipse 3.7 (Not in Indigo)" />
+ <source>
+ <repository location="${URL1}" />
+ <repository location="${URL2}" />
+ </source>
+
+ <slicingOptions includeFeatures="true" followStrict="true" />
+ </p2.mirror>
+
+ <delete>
+ <fileset dir="${destination}/0.5.0-20110915-1141-H87/" includes="**/artifacts.jar, **/contents.jar"/>
+ </delete>
+
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/0.5.0-20110915-1141-H87/" artifactRepository="file:${destination}/0.5.0-20110915-1141-H87/" publishartifacts="true" source="${destination}/0.5.0-20110915-1141-H87/" compress="${compress}" />
+ </target>
+</project>
14 years, 6 months
JBoss Tools SVN: r35545 - in trunk/as/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: 2011-10-11 12:55:10 -0400 (Tue, 11 Oct 2011)
New Revision: 35545
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
Log:
[JBIDE-9793] adding now maven nature if imported proj is maven proj
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-11 16:15:08 UTC (rev 35544)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-11 16:55:10 UTC (rev 35545)
@@ -10,6 +10,8 @@
org.eclipse.egit.core;bundle-version="[1.1.0,2.0.0)",
org.eclipse.jgit;bundle-version="[1.1.0,2.0.0)",
com.jcraft.jsch;bundle-version="0.1.44",
+ org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
+ org.eclipse.m2e.core;bundle-version="1.0.100",
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.databinding;bundle-version="1.4.0",
@@ -17,7 +19,6 @@
org.eclipse.core.databinding.observable;bundle-version="1.4.0",
org.eclipse.core.databinding.property;bundle-version="1.4.0",
org.eclipse.jface.databinding;bundle-version="[1.5.0,2.0.0)",
- org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
org.eclipse.wst.server.core;bundle-version="[1.1.3,2.0.0)",
org.eclipse.debug.core;bundle-version="[3.7.0,4.0.0)",
org.jboss.ide.eclipse.as.ui;bundle-version="[2.3.0,3.0.0)",
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11 16:15:08 UTC (rev 35544)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11 16:55:10 UTC (rev 35545)
@@ -37,6 +37,9 @@
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.merge.MergeStrategy;
import org.eclipse.jgit.transport.URIish;
+import org.eclipse.m2e.core.internal.MavenPluginActivator;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
@@ -86,10 +89,19 @@
overwriteExistingProject(project, monitor);
importToNewProject(projectDirectory, monitor, project);
-
+ if (isMavenProject(projectDirectory)) {
+ configureMavenNature(project, monitor);
+ }
+
createServerAdapterIfRequired();
}
+ private void configureMavenNature(IProject project, IProgressMonitor monitor) throws CoreException {
+ IProjectConfigurationManager manager = MavenPluginActivator.getDefault().getProjectConfigurationManager();
+ ResolverConfiguration resolverConfiguration = manager.getResolverConfiguration(project);
+ manager.enableMavenNature(project, resolverConfiguration, monitor);
+ }
+
private void importToNewProject(File projectDirectory, IProgressMonitor monitor, IProject project)
throws CoreException, InvocationTargetException, InterruptedException {
project.create(monitor);
@@ -178,8 +190,8 @@
private boolean isReadable(File destination) {
return destination == null
- || !destination.exists()
- || !destination.canRead();
+ || destination.exists()
+ || destination.canRead();
}
private File getDestinationDirectory(IApplication application) {
14 years, 6 months
JBoss Tools SVN: r35544 - in trunk/as/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: 2011-10-11 12:15:08 -0400 (Tue, 11 Oct 2011)
New Revision: 35544
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenshiftWizardPage.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizard.java
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
Log:
[JBIDE-9793] import general project works now, next step: add maven nature (etc) if maven proj
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-11 15:54:38 UTC (rev 35543)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-10-11 16:15:08 UTC (rev 35544)
@@ -21,7 +21,8 @@
org.eclipse.wst.server.core;bundle-version="[1.1.3,2.0.0)",
org.eclipse.debug.core;bundle-version="[3.7.0,4.0.0)",
org.jboss.ide.eclipse.as.ui;bundle-version="[2.3.0,3.0.0)",
- org.eclipse.wst.server.ui;bundle-version="[1.1.3,2.0.0)"
+ org.eclipse.wst.server.ui;bundle-version="[1.1.3,2.0.0)",
+ org.eclipse.ui.ide;bundle-version="3.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenshiftWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenshiftWizardPage.java 2011-10-11 15:54:38 UTC (rev 35543)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AbstractOpenshiftWizardPage.java 2011-10-11 16:15:08 UTC (rev 35544)
@@ -43,9 +43,7 @@
@Override
public void createControl(Composite parent) {
this.dbc = new DataBindingContext();
- ParametrizableWizardPageSupport.create(
- IStatus.ERROR | IStatus.INFO | IStatus.WARNING | IStatus.CANCEL, this,
- dbc);
+ setupWizardPageSupport(dbc);
Composite container = new Composite(parent, SWT.NONE);
GridLayoutFactory.fillDefaults().margins(6,6).applyTo(container);
Composite child = new Composite(container, SWT.NONE);
@@ -55,6 +53,12 @@
doCreateControls(child, dbc);
}
+ protected void setupWizardPageSupport(DataBindingContext dbc) {
+ ParametrizableWizardPageSupport.create(
+ IStatus.ERROR | IStatus.INFO | IStatus.WARNING | IStatus.CANCEL, this,
+ dbc);
+ }
+
protected void initPageChangedListener() {
IWizardContainer wizardContainer = getContainer();
if (wizardContainer instanceof WizardDialog) {
@@ -84,4 +88,9 @@
protected abstract void doCreateControls(Composite parent, DataBindingContext dbc);
+
+ protected DataBindingContext getDataBindingContext() {
+ return dbc;
+ }
+
}
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-10-11 15:54:38 UTC (rev 35543)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-10-11 16:15:08 UTC (rev 35544)
@@ -207,7 +207,7 @@
@Override
public void widgetSelected(SelectionEvent e) {
try {
- if (MessageDialog.openConfirm(getShell(),
+ if (MessageDialog.openQuestion(getShell(),
"Delete Application",
NLS.bind(
"You're up to delete all data within an application. The data may not be recovered. "
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2011-10-11 15:54:38 UTC (rev 35543)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2011-10-11 16:15:08 UTC (rev 35544)
@@ -154,7 +154,7 @@
}
};
}
-
+
private static class CredentialsStatusValidator implements IValidator {
public IStatus validate(Object value) {
if (value instanceof IStatus) {
@@ -168,4 +168,5 @@
return ValidationStatus.error("The given credentials are not valid");
}
}
+
}
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2011-10-11 15:54:38 UTC (rev 35543)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2011-10-11 16:15:08 UTC (rev 35544)
@@ -120,7 +120,11 @@
return credentialsValidity;
}
- public void validateCredentials() {
+ public boolean areCredentialsValidated() {
+ return credentialsValidity != null;
+ }
+
+ public IStatus validateCredentials() {
IStatus status = new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID, "Your credentails are not valid.");
try {
this.user = new User(getRhLogin(), getPassword(), ID);
@@ -135,6 +139,7 @@
}
wizardModel.setUser(user);
setCredentialsStatus(status);
+ return status;
}
public IUser getUser() {
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizard.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizard.java 2011-10-11 15:54:38 UTC (rev 35543)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizard.java 2011-10-11 16:15:08 UTC (rev 35544)
@@ -10,8 +10,7 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
+import java.io.File;
import java.net.URISyntaxException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -52,7 +51,8 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
- model.setupProject();
+ File repositoryFile = model.cloneRepository(monitor);
+ model.importProject(repositoryFile, monitor);
return Status.OK_STATUS;
} catch (OpenshiftException e) {
return new Status(IStatus.ERROR, OpenshiftUIActivator.PLUGIN_ID,
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11 15:54:38 UTC (rev 35543)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ServerAdapterWizardModel.java 2011-10-11 16:15:08 UTC (rev 35544)
@@ -15,11 +15,15 @@
import java.lang.reflect.InvocationTargetException;
import java.net.URISyntaxException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
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.egit.core.op.CloneOperation;
import org.eclipse.egit.ui.Activator;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.InitCommand;
import org.eclipse.jgit.api.errors.CheckoutConflictException;
@@ -33,6 +37,12 @@
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.merge.MergeStrategy;
import org.eclipse.jgit.transport.URIish;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.express.client.IApplication;
@@ -47,11 +57,11 @@
private static final String REMOTE_NAME = "openshift";
private IUser user;
private IApplication application;
-
+
public void setUser(IUser user) {
this.user = user;
}
-
+
public IUser getUser() {
return user;
}
@@ -64,31 +74,123 @@
this.application = application;
}
- public void setupProject() throws OpenshiftException, URISyntaxException, InvocationTargetException, InterruptedException, IOException, NoHeadException, ConcurrentRefUpdateException, CheckoutConflictException, InvalidMergeHeadsException, WrongRepositoryStateException, NoMessageException, CoreException {
- String applicationWorkingdir = "openshift-" + application.getName();
-// File workspace = ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
- String userHome = System.getProperty("java.io.tmpdir");
-// File workDir = new File(workspace, applicationWorkingdir);
- File clonedDirectory = new File(userHome, applicationWorkingdir);
- URIish gitUri = new URIish(application.getGitUri());
- if (clonedDirectory.exists()) {
- FileUtil.completeDelete(clonedDirectory);
- }
- CloneOperation cloneOperation = new CloneOperation(gitUri, true, null, clonedDirectory, Constants.HEAD, "origin", 10 * 1024);
-// cloneOperation.setCredentialsProvider(new UsernamePasswordCredentialsProvider(user.getRhlogin(), user.getPassword()));
+ public void importProject(File projectDirectory, IProgressMonitor monitor) throws OpenshiftException,
+ URISyntaxException,
+ InvocationTargetException, InterruptedException, IOException, NoHeadException,
+ ConcurrentRefUpdateException, CheckoutConflictException, InvalidMergeHeadsException,
+ WrongRepositoryStateException, NoMessageException, CoreException {
+ final String projectName = projectDirectory.getName();
+
+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = workspaceRoot.getProject(projectName);
+ overwriteExistingProject(project, monitor);
+
+ importToNewProject(projectDirectory, monitor, project);
+
+ createServerAdapterIfRequired();
+ }
+
+ private void importToNewProject(File projectDirectory, IProgressMonitor monitor, IProject project)
+ throws CoreException, InvocationTargetException, InterruptedException {
+ project.create(monitor);
+ project.open(monitor);
+ ImportOperation operation =
+ new ImportOperation(
+ project.getFullPath()
+ , projectDirectory
+ , FileSystemStructureProvider.INSTANCE
+ , new IOverwriteQuery() {
+ public String queryOverwrite(String file) {
+ return IOverwriteQuery.ALL;
+ }
+ });
+ operation.setCreateContainerStructure(false);
+ operation.run(monitor);
+ }
+
+ private void overwriteExistingProject(final IProject project, IProgressMonitor monitor)
+ throws CoreException {
+ if (project == null
+ || !project.exists()) {
+ return;
+ }
+
+ final boolean[] overwrite = new boolean[1];
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ overwrite[0] = MessageDialog.openQuestion(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ "Overwrite project?",
+ NLS.bind(
+ "A project \"{0}\" already exists in the workspace.\n"
+ + "If you want to import the OpenShift \"{0}\", the project in your workspace will "
+ + "get overwritten and may not be recovered.\n\n"
+ + "Are you sure that you want to overwrite the project \"{0}\" in your workspace?",
+ project.getName()));
+ }
+
+ });
+ if (overwrite[0]) {
+ project.delete(true, true, monitor);
+ }
+ }
+
+ public File cloneRepository(IProgressMonitor monitor) throws URISyntaxException, OpenshiftException,
+ InvocationTargetException,
+ InterruptedException {
+ File destination = getDestinationDirectory(application);
+ cloneRepository(application.getGitUri(), destination, monitor);
+ return destination;
+ }
+
+ private void cloneRepository(String uri, File destination, IProgressMonitor monitor) throws URISyntaxException,
+ OpenshiftException,
+ InvocationTargetException,
+ InterruptedException {
+ if (destination.exists()) {
+ FileUtil.completeDelete(destination);
+ }
+ URIish gitUri = new URIish(uri);
+ CloneOperation cloneOperation =
+ new CloneOperation(gitUri, true, null, destination, Constants.HEAD, "origin", 10 * 1024);
cloneOperation.run(null);
- File gitDirectory = new File(clonedDirectory, Constants.DOT_GIT);
+ File gitDirectory = new File(destination, Constants.DOT_GIT);
Activator.getDefault().getRepositoryUtil().addConfiguredRepository(gitDirectory);
-// File repositoryFile = createRepositoryFile(applicationWorkingdir);
-// Git git = createGit(repositoryFile);
- // TODO replace remote name by user setting
-// Repository repository = git.getRepository();
-// EGitUtils.addRemoteTo(REMOTE_NAME, new URIish(application.getGitUri()), repository);
-// mergeWithRemote(git, REMOTE_NAME);
-
- createServerAdapterIfRequired();
}
-
+
+ private boolean isEclipseProject(File destination) {
+ if (isReadable(destination)) {
+ return false;
+ }
+
+ return isReadable(new File(destination, ".project"));
+
+ }
+
+ private boolean isMavenProject(File destination) {
+ if (isReadable(destination)) {
+ return false;
+ }
+
+ return isReadable(new File(destination, "pom.xml"));
+ }
+
+ private boolean isReadable(File destination) {
+ return destination == null
+ || !destination.exists()
+ || !destination.canRead();
+ }
+
+ private File getDestinationDirectory(IApplication application) {
+ String applicationDirectory = "openshift-" + application.getName();
+ // File workspace =
+ // ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
+ String userHome = System.getProperty("java.io.tmpdir");
+ // File workDir = new File(workspace, applicationWorkingdir);
+ return new File(userHome, applicationDirectory);
+ }
+
private void mergeWithRemote(Git git, String remoteName) throws CoreException, NoHeadException,
ConcurrentRefUpdateException, CheckoutConflictException, InvalidMergeHeadsException,
WrongRepositoryStateException, NoMessageException, IOException {
@@ -114,5 +216,5 @@
File repositoryFile = new File(gitRepoProject.toFile(), Constants.DOT_GIT);
return repositoryFile;
}
-
+
}
14 years, 6 months
JBoss Tools SVN: r35543 - trunk/struts/docs/struts_tools_ref_guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-10-11 11:54:38 -0400 (Tue, 11 Oct 2011)
New Revision: 35543
Modified:
trunk/struts/docs/struts_tools_ref_guide/en-US/config_file_debugger.xml
trunk/struts/docs/struts_tools_ref_guide/en-US/introduction.xml
trunk/struts/docs/struts_tools_ref_guide/en-US/master_output.xml
trunk/struts/docs/struts_tools_ref_guide/en-US/rel_resources_links.xml
Log:
Struts Reference Guide correction
Modified: trunk/struts/docs/struts_tools_ref_guide/en-US/config_file_debugger.xml
===================================================================
--- trunk/struts/docs/struts_tools_ref_guide/en-US/config_file_debugger.xml 2011-10-11 15:49:35 UTC (rev 35542)
+++ trunk/struts/docs/struts_tools_ref_guide/en-US/config_file_debugger.xml 2011-10-11 15:54:38 UTC (rev 35543)
@@ -17,7 +17,7 @@
JBoss Tools come with <property>Struts configuration file debugger</property>. It allows you to set break points on Struts diagram and then simply launch the server in debug mode.
</para>
- <para>Simply right click an Action or a page and select Add <guimenuitem>Breakpoint</guimenuitem>.</para>
+ <para>Simply right click an Action or a page and select <guimenuitem>Add Breakpoint</guimenuitem>.</para>
<figure>
<title>Adding Breakpoint</title>
<mediaobject>
@@ -26,4 +26,4 @@
</imageobject>
</mediaobject>
</figure>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: trunk/struts/docs/struts_tools_ref_guide/en-US/introduction.xml
===================================================================
--- trunk/struts/docs/struts_tools_ref_guide/en-US/introduction.xml 2011-10-11 15:49:35 UTC (rev 35542)
+++ trunk/struts/docs/struts_tools_ref_guide/en-US/introduction.xml 2011-10-11 15:54:38 UTC (rev 35543)
@@ -61,7 +61,7 @@
<entry><para>Support for Struts Configuration File</para></entry>
<entry>
<para>
- Working on files using three modes: diagram, tree and source. Synchronization between the modes and full control over the code. Easily move around the diagram using the Diagram Navigator. Working with struts projects that have multiple modules. The option to use thee Struts configuration file debugger, which allows break points to be set on a Struts diagram and then launch the server in debug mode.
+ Working on files using three modes: diagram, tree and source. Synchronization between the modes and full control over the code. Easily move around the diagram using the Diagram Navigator. Working with struts projects that have multiple modules. The option to use the Struts configuration file debugger, which allows break points to be set on a Struts diagram and then launch the server in debug mode.
</para>
</entry>
<entry>
@@ -104,9 +104,9 @@
<title>Other relevant resources on the topic</title>
<para>
- All JBoss Developer Studio/JBoss Tools documentation you can find on<ulink url="http://docs.jboss.org/tools/">JBoss Tools project page </ulink>.
+ All JBoss Developer Studio/JBoss Tools documentation you can find on <ulink url="http://docs.jboss.org/tools/">JBoss Tools project page </ulink>.
</para>
- <para>The latest documentation builds are available on<ulink url="http://download.jboss.org/jbosstools/nightly-docs/">nightly docs page</ulink>.</para>
+ <para>The latest documentation builds are available on <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">nightly docs page</ulink>.</para>
</section>
Modified: trunk/struts/docs/struts_tools_ref_guide/en-US/master_output.xml
===================================================================
--- trunk/struts/docs/struts_tools_ref_guide/en-US/master_output.xml 2011-10-11 15:49:35 UTC (rev 35542)
+++ trunk/struts/docs/struts_tools_ref_guide/en-US/master_output.xml 2011-10-11 15:54:38 UTC (rev 35543)
@@ -171,8 +171,8 @@
<section>
<title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find on<ulink url="http://docs.jboss.org/tools/">JBoss Tools project page </ulink>.</para>
- <para>The latest documentation builds are available on<ulink url="http://download.jboss.org/jbosstools/nightly-docs/">nightly docs page</ulink>.</para>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find on <ulink url="http://docs.jboss.org/tools/">JBoss Tools project page </ulink>.</para>
+ <para>The latest documentation builds are available on <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">nightly docs page</ulink>.</para>
</section>
Modified: trunk/struts/docs/struts_tools_ref_guide/en-US/rel_resources_links.xml
===================================================================
--- trunk/struts/docs/struts_tools_ref_guide/en-US/rel_resources_links.xml 2011-10-11 15:49:35 UTC (rev 35542)
+++ trunk/struts/docs/struts_tools_ref_guide/en-US/rel_resources_links.xml 2011-10-11 15:54:38 UTC (rev 35543)
@@ -16,7 +16,7 @@
<para>More information on Struts can be found on the <ulink url="http://struts.apache.org/">Struts website</ulink>.</para>
<para>
- This reference has been designed to help you become familiar with those parts of <property>JBoss Tools</property> which assist in developing using Struts technology. It covers how to create and import Struts projects, enable Struts capabilities for an existing web project, as well as organize and edit all necessary the necessary files in your Struts application using the views and editors provided by <property>JBoss Tools</property>.
+ This reference has been designed to help you become familiar with those parts of <property>JBoss Tools</property> which assist in developing using Struts technology. It covers how to create and import Struts projects, enable Struts capabilities for an existing web project, as well as organize and edit all the necessary files in your Struts application using the views and editors provided by <property>JBoss Tools</property>.
</para>
<para>
14 years, 6 months