JBoss Tools SVN: r42415 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb: include and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-05 14:43:26 -0400 (Thu, 05 Jul 2012)
New Revision: 42415
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IIncludeModel.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IKbProject.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeModel.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/FaceletPageContextImpl.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
Log:
JBIDE-3526
https://issues.jboss.org/browse/JBIDE-3526
Store/load include model.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IKbProject.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IKbProject.java 2012-07-05 18:27:02 UTC (rev 42414)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IKbProject.java 2012-07-05 18:43:26 UTC (rev 42415)
@@ -13,6 +13,7 @@
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.IPath;
import org.jboss.tools.common.validation.IProjectValidationContext;
+import org.jboss.tools.jst.web.kb.include.IIncludeModel;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
/**
@@ -50,4 +51,9 @@
* @return validation context which is associated with this KB project.
*/
IProjectValidationContext getValidationContext();
+
+ /**
+ * @return model object that collects <ui:include> elements from pages
+ */
+ IIncludeModel getIncludeModel();
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2012-07-05 18:27:02 UTC (rev 42414)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2012-07-05 18:43:26 UTC (rev 42415)
@@ -423,7 +423,10 @@
}
if(file != null) {
- IncludeModel.getInstance().clean(file.getFullPath());
+ IKbProject kbProject = KbProjectFactory.getKbProject(project, true);
+ if(kbProject != null) {
+ kbProject.getIncludeModel().clean(file.getFullPath());
+ }
}
// The subsequently called functions may use the file and document
// already stored in context for their needs
@@ -646,11 +649,12 @@
}
}
+ static String ATTR_SRC = "src"; //$NON-NLS-1$
+ static String NODE_PARAM = "param"; //$NON-NLS-1$
+ static String ATTR_NAME = "name"; //$NON-NLS-1$
+ static String ATTR_VALUE = "value"; //$NON-NLS-1$
+
private static void fillUIParamsForNode(IDOMElement node, ELContextImpl context) {
- String ATTR_SRC = "src"; //$NON-NLS-1$
- String NODE_PARAM = "param"; //$NON-NLS-1$
- String ATTR_NAME = "name"; //$NON-NLS-1$
- String ATTR_VALUE = "value"; //$NON-NLS-1$
if(IncludeContextBuilder.TAG_INCLUDE.equals(node.getLocalName()) && CustomTagLibManager.FACELETS_UI_TAG_LIB_URI.equals(node.getNamespaceURI())) {
String src = node.getAttribute(ATTR_SRC);
if(src == null || src.trim().length() == 0) {
@@ -695,8 +699,11 @@
}
}
if(vars != null && !vars.isEmpty()) {
- PageInclude include = new PageInclude(context.getResource().getFullPath(), includedFile.getFullPath(), vars);
- IncludeModel.getInstance().addInclude(context.getResource().getFullPath(), include);
+ IKbProject kbProject = KbProjectFactory.getKbProject(context.getResource().getProject(), true);
+ if(kbProject != null) {
+ PageInclude include = new PageInclude(context.getResource().getFullPath(), includedFile.getFullPath(), vars);
+ kbProject.getIncludeModel().addInclude(context.getResource().getFullPath(), include);
+ }
}
}
}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IIncludeModel.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IIncludeModel.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IIncludeModel.java 2012-07-05 18:43:26 UTC (rev 42415)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.jst.web.kb.include;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.common.el.core.resolver.Var;
+
+/**
+ * Keeps data from <ui:include> elements.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public interface IIncludeModel {
+
+ /**
+ * Returns list of parameters defined by <ui:param> nodes to be used at the page with the given path.
+ *
+ * @param page
+ * @return
+ */
+ public List<Var> getVars(IPath path);
+
+ /**
+ * Cleans data collected for the path.
+ *
+ * @param path
+ */
+ public void clean(IPath path);
+
+ /**
+ * Adds to the model data defined by <ui:include> at path.
+ *
+ * @param parent
+ * @param include
+ */
+ public void addInclude(IPath path, PageInclude include);
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IIncludeModel.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeModel.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeModel.java 2012-07-05 18:27:02 UTC (rev 42414)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/include/IncludeModel.java 2012-07-05 18:43:26 UTC (rev 42415)
@@ -17,34 +17,32 @@
import java.util.Map;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.common.el.core.ELReference;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.el.core.resolver.Var;
+import org.jboss.tools.common.xml.XMLUtilities;
+import org.w3c.dom.Element;
/**
*
* @author Viacheslav Kabanovich
*
*/
-public class IncludeModel {
-
- private final static IncludeModel instance = new IncludeModel();
-
- public static IncludeModel getInstance() {
- return instance;
- }
-
+public class IncludeModel implements IIncludeModel {
private Map<IPath, List<PageInclude>> directReferences = new HashMap<IPath, List<PageInclude>>();
private Map<IPath, List<PageInclude>> parentReferences = new HashMap<IPath, List<PageInclude>>();
- private IncludeModel() {}
+ public IncludeModel() {}
- public synchronized void clean(IPath parent) {
- List<PageInclude> old = directReferences.remove(parent);
+ public synchronized void clean(IPath path) {
+ List<PageInclude> old = directReferences.remove(path);
if(old != null && !old.isEmpty()) {
for (IPath child: parentReferences.keySet()) {
Iterator<PageInclude> is = parentReferences.get(child).iterator();
while(is.hasNext()) {
PageInclude i = is.next();
- if(i.getParent().equals(parent)) {
+ if(i.getParent().equals(path)) {
is.remove();
}
}
@@ -52,11 +50,11 @@
}
}
- public synchronized void addInclude(IPath parent, PageInclude include) {
- List<PageInclude> current = directReferences.get(parent);
+ public synchronized void addInclude(IPath path, PageInclude include) {
+ List<PageInclude> current = directReferences.get(path);
if(current == null) {
current = new ArrayList<PageInclude>();
- directReferences.put(parent, current);
+ directReferences.put(path, current);
}
current.add(include);
IPath child = include.getPath();
@@ -68,9 +66,9 @@
is.add(include);
}
- public synchronized List<Var> getVars(IPath page) {
+ public synchronized List<Var> getVars(IPath path) {
List<Var> result = new ArrayList<Var>();
- List<PageInclude> is = parentReferences.get(page);
+ List<PageInclude> is = parentReferences.get(path);
if(is != null) {
for (PageInclude i: is) {
result.addAll(i.getVars());
@@ -78,6 +76,98 @@
}
return result;
}
-
+ static final String STORE_ELEMENT_INCLUDES = "includes"; //$NON-NLS-1$
+ static final String STORE_ELEMENT_PAGE = "page"; //$NON-NLS-1$
+ static final String STORE_ELEMENT_INCLUDE = "include"; //$NON-NLS-1$
+ static final String STORE_ELEMENT_VAR = "var"; //$NON-NLS-1$
+
+ static final String STORE_ATTR_PATH = "path"; //$NON-NLS-1$
+ static final String STORE_ATTR_NAME = "name"; //$NON-NLS-1$
+ static final String STORE_ATTR_VALUE = "value"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.validation.IValidationContext#store(org.w3c.dom.Element)
+ */
+ public void store(Element root) {
+ Map<String, String> pathAliases = loadAliases(root);
+ Element includes = XMLUtilities.createElement(root, STORE_ELEMENT_INCLUDES);
+ for (IPath path : directReferences.keySet()) {
+ Element page = XMLUtilities.createElement(includes, STORE_ELEMENT_PAGE);
+ String pathAlias = ELReference.getAlias(pathAliases, path.toString());
+ page.setAttribute(STORE_ATTR_PATH, pathAlias);
+ List<PageInclude> is = directReferences.get(path);
+ for (PageInclude i: is) {
+ Element includeElement = XMLUtilities.createElement(page, STORE_ELEMENT_INCLUDE);
+ String pathAlias1 = ELReference.getAlias(pathAliases, i.getPath().toString());
+ includeElement.setAttribute(STORE_ATTR_PATH, pathAlias1);
+ List<Var> vars = i.getVars();
+ for (Var var: vars) {
+ Element varElement = XMLUtilities.createElement(includeElement, STORE_ELEMENT_VAR);
+ varElement.setAttribute(STORE_ATTR_NAME, var.getName());
+ varElement.setAttribute(STORE_ATTR_VALUE, var.getValue());
+ }
+ }
+ }
+
+ Element aliases = XMLUtilities.getUniqueChild(root, "aliases"); //$NON-NLS-1$
+ if(aliases == null) {
+ aliases = XMLUtilities.createElement(root, "aliases"); //$NON-NLS-1$
+ }
+ for (String path: pathAliases.keySet()) {
+ String value = pathAliases.get(path);
+ Element alias = XMLUtilities.createElement(aliases, "alias"); //$NON-NLS-1$
+ alias.setAttribute(STORE_ATTR_PATH, path);
+ alias.setAttribute(STORE_ATTR_VALUE, value);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.validation.IValidationContext#load(org.w3c.dom.Element)
+ */
+ public void load(Element root) {
+ Map<String, String> pathAliases = loadAliases(root);
+
+ Element includes = XMLUtilities.getUniqueChild(root, STORE_ELEMENT_INCLUDES);
+ if(includes == null) return;
+ Element[] pages = XMLUtilities.getChildren(includes, STORE_ELEMENT_PAGE);
+ for (Element page : pages) {
+ String spath = page.getAttribute(STORE_ATTR_PATH);
+ if(spath == null || spath.trim().length() == 0) continue;
+ spath = ELReference.getPath(pathAliases, spath);
+ IPath path = new Path(spath);
+ clean(path);
+ Element[] is = XMLUtilities.getChildren(page, STORE_ELEMENT_INCLUDE);
+ for (Element includeElement: is) {
+ List<Var> vars = new ArrayList<Var>();
+ String path1 = includeElement.getAttribute(STORE_ATTR_PATH);
+ if(path1 == null || path1.trim().length() == 0) continue;
+ Element[] vs = XMLUtilities.getChildren(includeElement, STORE_ELEMENT_VAR);
+ for (Element v: vs) {
+ String name = v.getAttribute(STORE_ATTR_NAME);
+ String value = v.getAttribute(STORE_ATTR_VALUE);
+ Var var = new Var(ELParserUtil.getJbossFactory(), name, value, 0, 0); //TODO
+ vars.add(var);
+ }
+ path1 = ELReference.getPath(pathAliases, path1);
+ addInclude(path, new PageInclude(path, new Path(path1), vars));
+ }
+ }
+ }
+
+ Map<String, String> loadAliases(Element root) {
+ Map<String, String> pathAliases = new HashMap<String, String>();
+ Element aliases = XMLUtilities.getUniqueChild(root, "aliases"); //$NON-NLS-1$
+ if(aliases != null) {
+ Element[] aliasArray = XMLUtilities.getChildren(aliases, "alias"); //$NON-NLS-1$
+ for (Element alias: aliasArray) {
+ String path = alias.getAttribute(STORE_ATTR_PATH);
+ String value = alias.getAttribute(STORE_ATTR_VALUE);
+ pathAliases.put(value, path);
+ }
+ }
+ return pathAliases;
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/FaceletPageContextImpl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/FaceletPageContextImpl.java 2012-07-05 18:27:02 UTC (rev 42414)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/FaceletPageContextImpl.java 2012-07-05 18:43:26 UTC (rev 42415)
@@ -15,6 +15,8 @@
import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.jst.web.kb.IFaceletPageContext;
+import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.KbProjectFactory;
import org.jboss.tools.jst.web.kb.include.IncludeModel;
/**
@@ -27,7 +29,11 @@
private Map<String, String> params;
public List<Var> getExternalVars() {
- List<Var> res = IncludeModel.getInstance().getVars(getResource().getFullPath());
+ List<Var> res = null;
+ IKbProject kbProject = KbProjectFactory.getKbProject(getResource().getProject(), true);
+ if(kbProject != null) {
+ res = kbProject.getIncludeModel().getVars(getResource().getFullPath());
+ }
return res == null ? super.getExternalVars() : res;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2012-07-05 18:27:02 UTC (rev 42414)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2012-07-05 18:43:26 UTC (rev 42415)
@@ -45,6 +45,8 @@
import org.jboss.tools.jst.web.kb.KbMessages;
import org.jboss.tools.jst.web.kb.KbProjectFactory;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
+import org.jboss.tools.jst.web.kb.include.IIncludeModel;
+import org.jboss.tools.jst.web.kb.include.IncludeModel;
import org.jboss.tools.jst.web.kb.internal.scanner.ClassPathMonitor;
import org.jboss.tools.jst.web.kb.internal.scanner.LibraryProxy;
import org.jboss.tools.jst.web.kb.internal.scanner.LoadedDeclarations;
@@ -91,6 +93,8 @@
Map<String, Object> extensionModels = new HashMap<String, Object>();
+ IncludeModel includeModel = new IncludeModel();
+
public KbProject() {}
public void setMock() {
@@ -124,6 +128,10 @@
return libraries.getLibrariesArray(path);
}
+ public IIncludeModel getIncludeModel() {
+ return includeModel;
+ }
+
/*
* (non-Javadoc)
* @see org.eclipse.core.resources.IProjectNature#configure()
@@ -333,6 +341,7 @@
if(root != null) {
getValidationContext().load(root);
+ includeModel.load(root);
}
} finally {
@@ -438,6 +447,7 @@
storeSourcePaths2(root);
if(validationContext != null) validationContext.store(root);
+ includeModel.store(root);
XMLUtilities.serialize(root, file.getAbsolutePath());
13 years, 9 months
JBoss Tools SVN: r42414 - in trunk/common/plugins/org.jboss.tools.common.el.core: src/org/jboss/tools/common/el/core/resolver and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-05 14:27:02 -0400 (Thu, 05 Jul 2012)
New Revision: 42414
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java
Log:
JBIDE-3526
https://issues.jboss.org/browse/JBIDE-3526
Vars are loaded from ui:param.
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/.settings/org.eclipse.jdt.core.prefs 2012-07-05 17:48:36 UTC (rev 42413)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/.settings/org.eclipse.jdt.core.prefs 2012-07-05 18:27:02 UTC (rev 42414)
@@ -1 +1,9 @@
+#Fri Sep 30 12:13:47 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.source=1.6
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java 2012-07-05 17:48:36 UTC (rev 42413)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java 2012-07-05 18:27:02 UTC (rev 42414)
@@ -49,6 +49,12 @@
return result.toArray(new Var[allVars.size()]);
}
+ /**
+ * Returns list of vars that are not defined withing current page,
+ * for instance, by <ui:param> on a page that includes this page.
+ *
+ * @return
+ */
public List<Var> getExternalVars() {
return EMPTY;
}
13 years, 9 months
JBoss Tools SVN: r42413 - trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-07-05 13:48:36 -0400 (Thu, 05 Jul 2012)
New Revision: 42413
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation/DeltaspikeValidationTest.java
Log:
cleaned cdi tests
Modified: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation/DeltaspikeValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation/DeltaspikeValidationTest.java 2012-07-05 16:35:27 UTC (rev 42412)
+++ trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation/DeltaspikeValidationTest.java 2012-07-05 17:48:36 UTC (rev 42413)
@@ -22,10 +22,6 @@
*/
public class DeltaspikeValidationTest extends DeltaspikeCoreTest {
- public void testValidation() throws Exception {
- // TODO
- }
-
public void testConfigPropertyValidation() throws Exception {
IFile file = getTestProject().getFile("src/deltaspike/config/SettingsBean.java"); //$NON-NLS-1$
13 years, 9 months
JBoss Tools SVN: r42412 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-05 12:35:27 -0400 (Thu, 05 Jul 2012)
New Revision: 42412
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
Log:
JBIDE-3526
https://issues.jboss.org/browse/JBIDE-3526
Vars are loaded from ui:param.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2012-07-05 15:30:04 UTC (rev 42411)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2012-07-05 16:35:27 UTC (rev 42412)
@@ -694,7 +694,7 @@
}
}
}
- if(!vars.isEmpty()) {
+ if(vars != null && !vars.isEmpty()) {
PageInclude include = new PageInclude(context.getResource().getFullPath(), includedFile.getFullPath(), vars);
IncludeModel.getInstance().addInclude(context.getResource().getFullPath(), include);
}
13 years, 9 months
JBoss Tools SVN: r42411 - trunk/central/site.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-05 11:30:04 -0400 (Thu, 05 Jul 2012)
New Revision: 42411
Added:
trunk/central/site/category.xml
Removed:
trunk/central/site/site.xml
Modified:
trunk/central/site/pom.xml
Log:
JBIDE-11065: Replace invocation of aggregation script by generate-repository-facade on Central
Copied: trunk/central/site/category.xml (from rev 42330, trunk/central/site/site.xml)
===================================================================
--- trunk/central/site/category.xml (rev 0)
+++ trunk/central/site/category.xml 2012-07-05 15:30:04 UTC (rev 42411)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>
+ To install these features, point Eclipse at this site.
+ </description>
+ <feature url="features/org.jboss.tools.community.central.feature_0.0.0.jar" id="org.jboss.tools.community.central.feature" version="0.0.0">
+ <category name="JBoss Central Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.central.feature_0.0.0.jar" id="org.jboss.tools.central.feature" version="0.0.0">
+ </feature>
+ <feature url="features/org.jboss.tools.central.discovery.feature_0.0.0.jar" id="org.jboss.tools.central.discovery.feature" version="0.0.0">
+ </feature>
+
+ <feature url="features/org.jboss.tools.central.test.feature_0.0.0.jar" id="org.jboss.tools.central.test.feature" version="0.0.0">
+ <category name="JBoss Central Nightly Build Update Site"/>
+ </feature>
+
+ <category-def name="JBoss Central Nightly Build Update Site" label="JBoss Central Nightly Build Update Site">
+ <description>
+ JBoss Central Nightly Build Update Site: contains all features in this build.
+ </description>
+ </category-def>
+</site>
Modified: trunk/central/site/pom.xml
===================================================================
--- trunk/central/site/pom.xml 2012-07-05 14:18:26 UTC (rev 42410)
+++ trunk/central/site/pom.xml 2012-07-05 15:30:04 UTC (rev 42411)
@@ -10,76 +10,35 @@
<groupId>org.jboss.tools.central</groupId>
<artifactId>central.site</artifactId>
<name>central.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
+
+ <properties>
+ <update.site.description>Snapshots</update.site.description>
+ <update.site.version>${JBT_VERSION} ${BUILD_ALIAS}</update.site.version>
+ </properties>
+
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>${maven.antrun.plugin.version}</version>
+ <groupId>org.jboss.tools.tycho-plugins</groupId>
+ <artifactId>repository-utils</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
<executions>
<execution>
- <id>install</id>
- <phase>install</phase>
- <configuration>
- <quiet>true</quiet>
- <tasks>
- <!-- called AFTER generating update site + zip to add in extra content -->
- <!-- <ant antfile="build.xml" target="generate.directory.xml.only" dir="../../build/aggregate/"> -->
- <ant antfile="build.xml" target="basic.build" dir="../../build/aggregate/">
- <property name="output.dir" value="${basedir}" />
- <property name="inputRepo"
- value="${jbosstools-nightly-staging-composite}" />
- <property name="update.site.name" value="JBoss Tools - Central"/>
- <property name="JBT_VERSION" value="${JBT_VERSION}" />
- <property name="BUILD_ALIAS" value="${BUILD_ALIAS}" />
- </ant>
- <delete file="index.html"/>
- <delete file="jbosstools-directory.xml"/>
- </tasks>
- </configuration>
+ <id>generate-facade</id>
+ <phase>package</phase>
<goals>
- <goal>run</goal>
+ <goal>generate-repository-facade</goal>
</goals>
+ <configuration>
+ <symbols>
+ <update.site.name>JBoss Tools - Central</update.site.name>
+ <update.site.description>${update.site.description}</update.site.description>
+ <update.site.version>${update.site.version}</update.site.version>
+ </symbols>
+ </configuration>
</execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId>
- <version>1.4.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-trax</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-commons-net</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-apache-regexp</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
- </dependency>
- </dependencies>
</plugin>
</plugins>
</build>
Deleted: trunk/central/site/site.xml
===================================================================
--- trunk/central/site/site.xml 2012-07-05 14:18:26 UTC (rev 42410)
+++ trunk/central/site/site.xml 2012-07-05 15:30:04 UTC (rev 42411)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>
- To install these features, point Eclipse at this site.
- </description>
- <feature url="features/org.jboss.tools.community.central.feature_0.0.0.jar" id="org.jboss.tools.community.central.feature" version="0.0.0">
- <category name="JBoss Central Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.central.feature_0.0.0.jar" id="org.jboss.tools.central.feature" version="0.0.0">
- </feature>
- <feature url="features/org.jboss.tools.central.discovery.feature_0.0.0.jar" id="org.jboss.tools.central.discovery.feature" version="0.0.0">
- </feature>
-
- <feature url="features/org.jboss.tools.central.test.feature_0.0.0.jar" id="org.jboss.tools.central.test.feature" version="0.0.0">
- <category name="JBoss Central Nightly Build Update Site"/>
- </feature>
-
- <category-def name="JBoss Central Nightly Build Update Site" label="JBoss Central Nightly Build Update Site">
- <description>
- JBoss Central Nightly Build Update Site: contains all features in this build.
- </description>
- </category-def>
-</site>
13 years, 9 months
JBoss Tools SVN: r42410 - in trunk/jsf/tests: org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-07-05 10:18:26 -0400 (Thu, 05 Jul 2012)
New Revision: 42410
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectItem.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectItems.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectManyCheckbox.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/enumItem.xhtml.xml
Log:
JBIDE-12262 org.jboss.tools.jsf.vpe.jsf.test failure - fixed
JBIDE-12263 org.jboss.tools.jsf.vpe.seam.test failure - fixed
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectItem.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectItem.jsp.xml 2012-07-05 12:22:10 UTC (rev 42409)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectItem.jsp.xml 2012-07-05 14:18:26 UTC (rev 42410)
@@ -1,10 +1,10 @@
<tests>
<test id="selectItem1">
- <DIV>
+ <SPAN>
<INPUT TYPE="checkbox" />
<LABEL CLASS="myClass1">check1</LABEL>
- </DIV>
+ </SPAN>
</test>
<test id="selectItem2">
<OPTION> value1</OPTION>
@@ -58,9 +58,9 @@
</DIV>
</test>
<test id="selectItem4">
- <DIV>
+ <SPAN >
<INPUT TYPE="checkbox" DIR="ltr" />
<LABEL CLASS="myClass">check1</LABEL>
- </DIV>
+ </SPAN>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectItems.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectItems.jsp.xml 2012-07-05 12:22:10 UTC (rev 42409)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectItems.jsp.xml 2012-07-05 14:18:26 UTC (rev 42410)
@@ -1,9 +1,9 @@
<tests>
<test id="selectItems1">
- <DIV>
+ <SPAN STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="checkbox"/>
<LABEL>someValue</LABEL>
- </DIV>
+ </SPAN>
</test>
<test id="selectItems2">
<OPTION>someValue</OPTION>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectManyCheckbox.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectManyCheckbox.jsp.xml 2012-07-05 12:22:10 UTC (rev 42409)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/selectManyCheckbox.jsp.xml 2012-07-05 14:18:26 UTC (rev 42410)
@@ -4,26 +4,26 @@
<TABLE>
<TR>
<TD>
- <DIV>
+ <SPAN STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="checkbox" />
<LABEL> check1 </LABEL>
- </DIV>
+ </SPAN>
</TD>
</TR>
<TR>
<TD>
- <DIV>
+ <SPAN STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="checkbox" />
<LABEL> check2 </LABEL>
- </DIV>
+ </SPAN>
</TD>
</TR>
<TR>
<TD>
- <DIV>
+ <SPAN STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="checkbox" />
<LABEL>check3</LABEL>
- </DIV>
+ </SPAN>
</TD>
</TR>
</TABLE>
@@ -34,25 +34,25 @@
<TABLE BORDER="2" STYLE="color: red;" CLASS="myClass">
<TR>
<TD>
- <DIV>
+ <SPAN STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="checkbox" />
<LABEL>check1</LABEL>
- </DIV>
+ </SPAN>
</TD>
<TD>
- <DIV>
+ <SPAN STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="checkbox" />
<LABEL>check2</LABEL>
- </DIV>
+ </SPAN>
</TD>
<TD>
- <DIV>
+ <SPAN STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="checkbox" />
<LABEL>check3</LABEL>
- </DIV>
+ </SPAN>
</TD>
</TR>
</TABLE>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/enumItem.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/enumItem.xhtml.xml 2012-07-05 12:22:10 UTC (rev 42409)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/components/enumItem.xhtml.xml 2012-07-05 14:18:26 UTC (rev 42410)
@@ -1,6 +1,6 @@
<tests>
<test id="id1">
- <DIV>
+ <DIV STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="radio" NAME="radio_name_394"/>
<LABEL>
Only Once
@@ -13,11 +13,11 @@
</OPTION>
</test>
<test id="id3">
- <DIV>
+ <SPAN STYLE="-moz-user-modify: read-write;">
<INPUT TYPE="checkbox" />
<LABEL>
Only Once
</LABEL>
- </DIV>
+ </SPAN>
</test>
</tests>
\ No newline at end of file
13 years, 9 months
JBoss Tools SVN: r42409 - in trunk/tests/plugins/org.jboss.tools.tests.installation: .settings and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-05 08:22:10 -0400 (Thu, 05 Jul 2012)
New Revision: 42409
Added:
trunk/tests/plugins/org.jboss.tools.tests.installation/.classpath
trunk/tests/plugins/org.jboss.tools.tests.installation/.project
trunk/tests/plugins/org.jboss.tools.tests.installation/.settings/
trunk/tests/plugins/org.jboss.tools.tests.installation/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java
Log:
JBIDE-11713: Adapt to Eclipse 4.2 pop-up
Added: trunk/tests/plugins/org.jboss.tools.tests.installation/.classpath
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.installation/.classpath (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.tests.installation/.classpath 2012-07-05 12:22:10 UTC (rev 42409)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/tests/plugins/org.jboss.tools.tests.installation/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/tests/plugins/org.jboss.tools.tests.installation/.project
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.installation/.project (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.tests.installation/.project 2012-07-05 12:22:10 UTC (rev 42409)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.tests.installation</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/tests/plugins/org.jboss.tools.tests.installation/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/tests/plugins/org.jboss.tools.tests.installation/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.installation/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.tests.installation/.settings/org.eclipse.jdt.core.prefs 2012-07-05 12:22:10 UTC (rev 42409)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/tests/plugins/org.jboss.tools.tests.installation/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java 2012-07-05 12:20:58 UTC (rev 42408)
+++ trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java 2012-07-05 12:22:10 UTC (rev 42409)
@@ -146,7 +146,14 @@
}
}, 15 * 60000); // 15 more minutes
}
- this.bot.shell("Software Updates").bot().button("Not Now").click(); // Don't restart in test, test executor will do it.
+ SWTBot restartShellBot = this.bot.shell("Software Updates").bot();
+ try {
+ // Eclipse 3.7.x => "Not now"
+ restartShellBot.button("Not Now").click(); // Don't restart in test, test executor will do it.
+ } catch (WidgetNotFoundException ex) {
+ // Eclipse 4.2 => "No"
+ restartShellBot.button("No").click();
+ }
}
13 years, 9 months
JBoss Tools SVN: r42408 - branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-07-05 08:20:58 -0400 (Thu, 05 Jul 2012)
New Revision: 42408
Modified:
branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java
branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java
branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
Log:
JBIDE-12201 JBIDE-12046 to maintenance 3.3.x
Modified: branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java
===================================================================
--- branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java 2012-07-05 12:19:27 UTC (rev 42407)
+++ branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java 2012-07-05 12:20:58 UTC (rev 42408)
@@ -44,11 +44,13 @@
behavior.setServerStopped();
throw new CoreException(new Status(IStatus.ERROR,
org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
- MessageFormat.format("Could not execute command on remote server {0}", behavior.getServer().getName()), sme));
+ MessageFormat.format("Could not execute command on remote server {0}. Please ensure the server is reachable.", behavior.getServer().getName()), sme));
}
}
// Only for debugging
private void addShellOutputListener(IHostShell shell) {
+ if( shell == null )
+ return; // No listener needed for a null shell.
IHostShellOutputListener listener = null;
listener = new IHostShellOutputListener() {
public void shellOutputChanged(IHostShellChangeEvent event) {
Modified: branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java
===================================================================
--- branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java 2012-07-05 12:19:27 UTC (rev 42407)
+++ branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java 2012-07-05 12:20:58 UTC (rev 42408)
@@ -109,6 +109,8 @@
startupShell = hs;
startupShell.addOutputListener(listener);
return hs;
+ } catch(SystemMessageException sme) {
+ throw sme;
} catch(RuntimeException re) {
throw new CoreException(new Status(IStatus.ERROR, org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
re.getMessage(), re));
Modified: branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-07-05 12:19:27 UTC (rev 42407)
+++ branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-07-05 12:20:58 UTC (rev 42408)
@@ -23,12 +23,16 @@
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.IFileService;
+import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.Trace;
+import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.publishers.AbstractPublishMethod;
+import org.jboss.ide.eclipse.as.core.publishers.AbstractServerToolsPublisher;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.IPublishCopyCallbackHandler;
@@ -39,6 +43,7 @@
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel.ServerShellModel;
+import org.jboss.ide.eclipse.as.rse.core.RSERemotePublishHandler.RunnableWithProgress2;
public class RSEPublishMethod extends AbstractPublishMethod {
@@ -64,11 +69,15 @@
public void publishStart(DeployableServerBehavior behaviour,
IProgressMonitor monitor) throws CoreException {
- super.publishStart(behaviour, monitor);
+ monitor.beginTask("Beginning Publish for server " + behaviour.getServer().getName(), 300);
+ super.publishStart(behaviour, AbstractServerToolsPublisher.getSubMon(monitor, 100));
this.behaviour = behaviour;
loadRemoteDeploymentDetails();
- ensureConnection(monitor);
-
+ IStatus connected = ensureConnection(AbstractServerToolsPublisher.getSubMon(monitor, 100));
+ if( !connected.isOK() ) {
+ throw new CoreException(connected);
+ }
+
DelegatingServerBehavior b = (DelegatingServerBehavior) behaviour.getServer().loadAdapter(DelegatingServerBehavior.class, new NullProgressMonitor());
if( b != null && getServer().getServerState() == IServer.STATE_STARTED ) {
stopDeploymentScanner();
@@ -135,18 +144,38 @@
return behaviour.getServer();
}
- public boolean ensureConnection(IProgressMonitor monitor) {
+ public IStatus ensureConnection(IProgressMonitor monitor) {
+ monitor.beginTask("Verifying connectivity to remote server", 200);
+ Exception caught = null;
Trace.trace(Trace.STRING_FINER, "Ensuring connection to remote server for server " + getServer().getName());
if (fileSubSystem != null && !fileSubSystem.isConnected()) {
try {
- fileSubSystem.connect(monitor, false);
+ fileSubSystem.connect(AbstractServerToolsPublisher.getSubMon(monitor, 100), false);
} catch (Exception e) {
Trace.trace(Trace.STRING_FINER, "Exception connecting to remote server: " + e.getMessage());
- // I'd rather not catch Exception, but that's all they throw
- return false;
+ // I'd rather not catch raw Exception, but that's all they throw
+ caught = e;
}
}
- return fileSubSystem != null && fileSubSystem.isConnected();
+ boolean isConnected = fileSubSystem != null && fileSubSystem.isConnected();
+ String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
+ if( isConnected ) {
+ // The RSE tools might be mistaken here. The user may in fact have lost internet connectivity
+ RunnableWithProgress2 run = new RunnableWithProgress2("Accessing Remote System Root") {
+ public void run(IProgressMonitor monitor) throws CoreException,
+ SystemMessageException, RuntimeException {
+ getFileService().getRoots(monitor);
+ }
+ };
+ IProgressMonitor childMonitor = AbstractServerToolsPublisher.getSubMon(monitor, 100);
+ Exception e = RSERemotePublishHandler.wrapRemoteCallStatusTimeLimit(run, "null", "null", null, 15000, childMonitor);
+ if( e == null )
+ return Status.OK_STATUS;
+ return new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
+ "The remote server " + connectionName + " is currently not responding to file system requests.", e);
+ }
+ return new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
+ "Unable to communicate with remote connection: " + connectionName, caught);
}
public IPath getRemoteRootFolder() {
Modified: branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
===================================================================
--- branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2012-07-05 12:19:27 UTC (rev 42407)
+++ branches/jbosstools-3.3.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2012-07-05 12:20:58 UTC (rev 42408)
@@ -45,13 +45,20 @@
return shouldRestartModule;
}
- private interface RunnableWithProgress2 {
- public void run(IProgressMonitor monitor) throws CoreException, SystemMessageException, RuntimeException;
+ abstract static class RunnableWithProgress2 {
+ private String name;
+ public RunnableWithProgress2(String name){
+ this.name = name;
+ }
+ public abstract void run(IProgressMonitor monitor) throws CoreException, SystemMessageException, RuntimeException;
+ public String getName() {
+ return name;
+ }
}
- protected IStatus generateFailStatus(String message, String resource, Exception sme) {
- String connectionName = RSEUtils.getRSEConnectionName(method.getBehaviour().getServer());
- IHost host = RSEUtils.findHost(connectionName);
+ protected static IStatus generateFailStatus(String message, String resource, RSEPublishMethod method, Exception sme) {
+ String connectionName = method == null ? null : RSEUtils.getRSEConnectionName(method.getBehaviour().getServer());
+ IHost host = connectionName == null ? null : RSEUtils.findHost(connectionName);
IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
NLS.bind(message, resource, host == null ? null : host.getName()), sme);
return s;
@@ -60,12 +67,52 @@
private IStatus[] wrapRemoteCall(final RunnableWithProgress2 runnable,
final String remoteResource, final String failErrorMessage,
final IProgressMonitor monitor) throws CoreException, RuntimeException {
- return wrapRemoteCall(runnable, remoteResource, failErrorMessage, true, monitor);
+ return wrapRemoteCall(runnable, remoteResource, failErrorMessage, true,
+ method, monitor);
}
+
+ static IStatus[] wrapRemoteCall(final RunnableWithProgress2 runnable,
+ final String remoteResource, final String failErrorMessage,
+ final boolean alwaysThrow, RSEPublishMethod method, final IProgressMonitor monitor) throws CoreException, RuntimeException {
+ IStatus s = wrapRemoteCall2(runnable, remoteResource, failErrorMessage,
+ alwaysThrow, method, monitor);
+ return s == null ? new IStatus[]{} : new IStatus[]{s};
+ }
- private IStatus[] wrapRemoteCall(final RunnableWithProgress2 runnable,
+ static Exception wrapRemoteCallStatusTimeLimit(final RunnableWithProgress2 runnable,
final String remoteResource, final String failErrorMessage,
- final boolean alwaysThrow, final IProgressMonitor monitor) throws CoreException, RuntimeException {
+ RSEPublishMethod method, final int maxDelay, final IProgressMonitor monitor) {
+ Thread t = new Thread("Remote call timer") {
+ public void run() {
+ try {
+ Thread.sleep(maxDelay);
+ monitor.setCanceled(true);
+ } catch( InterruptedException ie) {
+ // Do Nothing
+ }
+ }
+ };
+ t.start();
+ try {
+ wrapRemoteCall2(runnable, remoteResource, failErrorMessage,
+ true, method, monitor);
+ } catch (CoreException e) {
+ if( e.getStatus().getSeverity() == IStatus.CANCEL ) {
+ return new CoreException(new Status(IStatus.CANCEL,RSECorePlugin.PLUGIN_ID,
+ "The remote operation has been canceled because it did not finish in the alloted time (" + maxDelay + "ms)"));
+ }
+ return e;
+ } catch (RuntimeException e) {
+ return e;
+ } finally {
+ t.interrupt();
+ }
+ return null;
+ }
+
+ static IStatus wrapRemoteCall2(final RunnableWithProgress2 runnable,
+ final String remoteResource, final String failErrorMessage,
+ final boolean alwaysThrow, final RSEPublishMethod method, final IProgressMonitor monitor) throws CoreException, RuntimeException {
final CoreException[] coreEx = new CoreException[1];
final RuntimeException[] runtEx = new RuntimeException[1];
@@ -80,7 +127,8 @@
} catch( CoreException ce ) {
coreEx[0] = ce;
} catch( SystemMessageException sme ) {
- IStatus stat = generateFailStatus(failErrorMessage, remoteResource, sme);
+ IStatus stat = generateFailStatus(failErrorMessage,
+ remoteResource, method, sme);
if( alwaysThrow )
coreEx[0] = new CoreException(stat);
else
@@ -99,14 +147,19 @@
}
}
- if( monitor.isCanceled()) {
- throw new CoreException(Status.CANCEL_STATUS);
+ if( monitor.isCanceled()) {
+ if( t.isAlive()) {
+ t.interrupt();
+ }
+ IStatus s = new Status(IStatus.CANCEL, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
+ "Remote operation was canceled: " + runnable.getName(), null);
+ throw new CoreException(s);
}
- if( runtEx[0] != null ) throw runtEx[0];
- if( coreEx[0] != null ) throw coreEx[0];
- if( failStat[0] != null ) return failStat;
- return new IStatus[]{};
-
+ // To ensure a full stack-trace, throw all new exceptions.
+ if( runtEx[0] != null ) throw new RuntimeException(runtEx[0]);
+ if( coreEx[0] != null ) throw new CoreException(coreEx[0].getStatus());
+ if( failStat[0] != null ) return failStat[0];
+ return null;
}
public IStatus[] copyFile(final IModuleFile mf, final IPath path,
@@ -116,7 +169,7 @@
final IPath remotePath = root.append(path);
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Copy file to remote location: " + remotePath.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
method.getFileService().upload(file, remotePath.removeLastSegments(1).toString(),
@@ -130,14 +183,14 @@
public IStatus[] deleteResource(final IPath path, final IProgressMonitor monitor)
throws CoreException {
final IPath remotePath = root.append(path);
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Delete remote file: " + remotePath.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
method.getFileService().delete(remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(), monitor);
}
};
- return wrapRemoteCall(run, remotePath.toString(), "failed to delete {0} on host {1}", false, monitor);
+ return wrapRemoteCall(run, remotePath.toString(), "failed to delete {0} on host {1}", false, method, monitor);
}
public IStatus[] makeDirectoryIfRequired(final IPath dir,
@@ -149,22 +202,23 @@
if( createdFolders.contains(toMake))
return new IStatus[]{Status.OK_STATUS};
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Create Remote Directory: " + toMake.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
if( toMake.segmentCount() > 0 ) {
method.getFileService().createFolder(toMake.removeLastSegments(1).toString(),
toMake.lastSegment(), monitor);
+ createdFolders.add(toMake);
}
}
};
- return wrapRemoteCall(run, toMake.toString(), "failed to create folder {0} on host {1}", false, monitor);
+ return wrapRemoteCall(run, toMake.toString(), "failed to create folder {0} on host {1}", false, method, monitor);
}
public IStatus[] touchResource(final IPath path, IProgressMonitor monitor) {
final IPath file = root.append(path);
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Touch remote resource" + file.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
@@ -175,7 +229,7 @@
}
};
try {
- return wrapRemoteCall(run, file.toString(), "failed to touch resource {0} on host {1}", false, monitor);
+ return wrapRemoteCall(run, file.toString(), "failed to touch resource {0} on host {1}", false, method, monitor);
} catch(CoreException ce) {
return new IStatus[]{ce.getStatus()};
}
@@ -188,7 +242,7 @@
final Boolean[] boolRet = new Boolean[1];
boolRet[0] = null;
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Verify remote file exists: " + file.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
13 years, 9 months
JBoss Tools SVN: r42407 - branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-07-05 08:19:27 -0400 (Thu, 05 Jul 2012)
New Revision: 42407
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviour.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-12071 to maintenance
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviour.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviour.java 2012-07-05 10:44:03 UTC (rev 42406)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviour.java 2012-07-05 12:19:27 UTC (rev 42407)
@@ -17,13 +17,18 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.server.core.IModule;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
public class ExpressBehaviour extends DelegatingServerBehavior {
private IAdaptable publishAdaptableInfo;
public IStatus publish(int kind, IProgressMonitor monitor) {
- if( publishAdaptableInfo != null && "user".equals(publishAdaptableInfo.getAdapter(String.class)))
+ boolean shouldPublish = false;
+ if( publishAdaptableInfo != null ) {
+ shouldPublish = "user".equals(publishAdaptableInfo.getAdapter(String.class)) || publishAdaptableInfo.getAdapter(Shell.class) != null;
+ }
+ if( shouldPublish )
return super.publish(kind, monitor);
return Status.OK_STATUS;
}
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-07-05 10:44:03 UTC (rev 42406)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-07-05 12:19:27 UTC (rev 42407)
@@ -99,15 +99,7 @@
public int publishModule(DeployableServerBehavior behaviour, int kind,
int deltaKind, IModule[] module, IProgressMonitor monitor)
throws CoreException {
-
- // If this action is not user-initiated, bail!
- IAdaptable a = ((ExpressBehaviour)behaviour).getPublishAdaptableInfo();
- if( a == null )
- return -1;
- String s = (String)a.getAdapter(String.class);
- if( s == null || !s.equals("user"))
- return -1;
-
+
if( module.length > 1 )
return IServer.PUBLISH_STATE_UNKNOWN;
@@ -347,6 +339,12 @@
IDeployableServer s = ServerConverter.getDeployableServer(server);
return s.getDeployFolder();
}
+
+ public String getPublishDefaultRootTempFolder(IServer server) {
+ IDeployableServer s = ServerConverter.getDeployableServer(server);
+ return s.getTempDeployFolder();
+ }
+
protected void refreshProject(final IProject project,IProgressMonitor monitor) throws CoreException {
// Already inside a workspace scheduling rule
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
13 years, 9 months
JBoss Tools SVN: r42406 - trunk/build/tycho-plugins.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-05 06:44:03 -0400 (Thu, 05 Jul 2012)
New Revision: 42406
Modified:
trunk/build/tycho-plugins/pom.xml
Log:
JBIDE-11065: Added javac config to pom
Modified: trunk/build/tycho-plugins/pom.xml
===================================================================
--- trunk/build/tycho-plugins/pom.xml 2012-07-05 10:32:26 UTC (rev 42405)
+++ trunk/build/tycho-plugins/pom.xml 2012-07-05 10:44:03 UTC (rev 42406)
@@ -15,6 +15,21 @@
<module>repository-utils</module>
</modules>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerVersion>1.5</compilerVersion>
+ <target>1.5</target>
+ <source>1.5</source>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
<!-- To deploy to Nexus -->
<!-- Don't change "id" since it should match credentials entry in $M2_REPO/settings.xml -->
13 years, 9 months