JBoss Tools SVN: r35118 - trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-09-28 11:33:59 -0400 (Wed, 28 Sep 2011)
New Revision: 35118
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationLogReaderTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/LogReaderRunnable.java
Log:
[JBIDE-9773] added additional test
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationLogReaderTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationLogReaderTest.java 2011-09-28 15:30:48 UTC (rev 35117)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationLogReaderTest.java 2011-09-28 15:33:59 UTC (rev 35118)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.openshift.test.internal.core;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -34,10 +35,12 @@
private static final int LOGREADER_TIMEOUT = 2 * 1024;
+ private static final String LOG_HEADER =
+ "tailing /var/lib/libra/f36a4acf8a73450cb98637ed4483ea02/1317146294966//jbossas-7.0/standalone/log/server.log"
+ + "------ Tail of 1317146294966 application server.log ------\n";
+
private static final String INITIAL_LOG =
- "tailing /var/lib/libra/f36a4acf8a73450cb98637ed4483ea02/1317146294966//jbossas-7.0/standalone/log/server.log"
- + "------ Tail of 1317146294966 application server.log ------\n"
- + "11:31:36,289 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem\n"
+ "11:31:36,289 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem\n"
+ "11:31:36,340 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http--127.1.9.1-8080\n"
+ "11:31:36,440 INFO [org.jboss.as.connector] (MSC service thread 1-4) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)\n"
+ "11:31:36,471 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) Bound data source [java:jboss/datasources/ExampleDS]\n"
@@ -60,7 +63,7 @@
+ "11:32:14,176 INFO [org.jboss.web] (MSC service thread 1-2) registering web context: \n"
+ "11:32:14,207 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed \"ROOT.war\"\n";
- private String status = INITIAL_LOG;
+ private String status = LOG_HEADER + INITIAL_LOG;
private IOpenshiftService statusService;
private Application application;
@@ -97,6 +100,7 @@
assertNotNull(newLog);
assertTrue(newLog.length() > 0);
assertFalse(log.equals(newLog));
+ assertEquals(INITIAL_LOG + LOG_CONTINUATION, logReaderRunnable.getLog());
} finally {
if (executor != null) {
executor.shutdownNow();
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/LogReaderRunnable.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/LogReaderRunnable.java 2011-09-28 15:30:48 UTC (rev 35117)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/LogReaderRunnable.java 2011-09-28 15:33:59 UTC (rev 35118)
@@ -21,12 +21,12 @@
public class LogReaderRunnable implements Runnable {
private ApplicationLogReader logReader;
- private BlockingQueue<Character> logQueue;
private long timeout;
-
+ private BlockingQueue<Character> logQueue = new LinkedBlockingDeque<Character>();
+ private StringBuilder logBuilder = new StringBuilder();
+
public LogReaderRunnable(ApplicationLogReader logReader, long timeout) {
this.logReader = logReader;
- this.logQueue = new LinkedBlockingDeque<Character>();
this.timeout = timeout;
}
@@ -46,6 +46,7 @@
boolean isNewEntry = character != null;
if (isNewEntry) {
builder.append(character);
+ logBuilder.append(character);
}
return isNewEntry;
}
@@ -57,4 +58,8 @@
}
return builder.toString();
}
+
+ public String getLog() {
+ return logBuilder.toString();
+ }
}
\ No newline at end of file
14 years, 2 months
JBoss Tools SVN: r35117 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-09-28 11:30:48 -0400 (Wed, 28 Sep 2011)
New Revision: 35117
Modified:
trunk/build/aggregate/site/site.xml
Log:
JBIDE-9784 Include JBoss Central to JBoss Tools
Modified: trunk/build/aggregate/site/site.xml
===================================================================
--- trunk/build/aggregate/site/site.xml 2011-09-28 14:40:35 UTC (rev 35116)
+++ trunk/build/aggregate/site/site.xml 2011-09-28 15:30:48 UTC (rev 35117)
@@ -90,6 +90,10 @@
<category name="AllTools" />
<category name="GeneralTools" />
</feature>
+ <feature url="features/org.jboss.tools.central.feature_0.0.0.jar" id="org.jboss.tools.central.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="GeneralTools" />
+ </feature>
<!-- only in JBT -->
<feature url="features/org.jboss.tools.forge.feature_0.0.0.jar" id="org.jboss.tools.forge.feature" version="0.0.0">
14 years, 2 months
JBoss Tools SVN: r35116 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-09-28 10:40:35 -0400 (Wed, 28 Sep 2011)
New Revision: 35116
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-9753 : multiple content web roots seem to confuse VPE
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2011-09-28 13:23:13 UTC (rev 35115)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2011-09-28 14:40:35 UTC (rev 35116)
@@ -218,41 +218,21 @@
- public static IFile getFile(IEditorInput input, String value) {
- IPath tagPath = new Path(value);
+ public static IFile getFile(IEditorInput input, String fileName) {
+ IPath tagPath = new Path(fileName);
if (tagPath.isEmpty()) return null;
if (input instanceof IFileEditorInput) {
- IContainer container = null;
- if(tagPath.isAbsolute()) {
- container = getWebRoot((IFileEditorInput)input);
- } else {
- IFile inputFile = ((IFileEditorInput)input).getFile();
- if(inputFile != null) container = inputFile.getParent();
- }
- IFile f = (container == null) ? null : container.getFile(tagPath);
- return (f == null || !f.exists()) ? null : f;
+ return getFile(fileName, ((IFileEditorInput) input).getFile());
} else if (input instanceof ILocationProvider) {
IPath path = ((ILocationProvider)input).getPath(input);
if(path == null || path.segmentCount() < 1) return null;
- path = path.removeLastSegments(1).append(value);
+ path = path.removeLastSegments(1).append(fileName);
return EclipseResourceUtil.getFile(path.toString());
}
return null;
}
- private static IContainer getWebRoot(IFileEditorInput input) {
- IProject project = ((IFileEditorInput)input).getFile().getProject();
- if(project != null && project.isOpen()) {
- IModelNature modelNature = EclipseResourceUtil.getModelNature(project);
- XModel model = (modelNature == null) ? null : modelNature.getModel();
- XModelObject webRoot = (model == null) ? null : model.getByPath("FileSystems/WEB-ROOT"); //$NON-NLS-1$
- IResource webRootResource = (webRoot == null) ? null : EclipseResourceUtil.getResource(webRoot);
- return (webRootResource instanceof IContainer) ? (IContainer)webRootResource : null;
- }
- return null;
- }
-
/**
* @param fileName
* @param includeFile
@@ -266,7 +246,7 @@
if (resources != null && resources.length == 1) {
String location = resources[0].getLocation() + fileName;
IPath path = new Path(location);
- return ResourcesPlugin.getWorkspace().getRoot()
+ file = ResourcesPlugin.getWorkspace().getRoot()
.getFileForLocation(path);
} else {
//WebArtifactEdit edit = WebArtifactEdit
@@ -294,7 +274,7 @@
String location = resources[0].getLocation() + File.separator
+ fileName;
IPath path = new Path(location);
- return ResourcesPlugin.getWorkspace().getRoot()
+ file = ResourcesPlugin.getWorkspace().getRoot()
.getFileForLocation(path);
} else {
file = resolveRelatedPath(includeFile, fileName);
@@ -323,13 +303,14 @@
/**
* Appends {@code relatedFilePath} to the parent directory of
- * {@code baseFile}.
+ * {@code baseFile}. Returns {@code null} if the file does not exist.
*/
private static IFile resolveRelatedPath(IFile baseFile,
String relatedFilePath) {
IPath currentFolder = baseFile.getParent().getFullPath();
IPath path = currentFolder.append(relatedFilePath);
- return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ IFile handle = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ return handle.exists() ? handle : null;
}
/**
14 years, 2 months
JBoss Tools SVN: r35115 - in trunk/as: plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-09-28 09:23:13 -0400 (Wed, 28 Sep 2011)
New Revision: 35115
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/IOpenshiftTestService.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/OpenshiftTestService.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/IOpenshiftService.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/OpenshiftService.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/NoopOpenshiftServiceFake.java
Log:
[JBIDE-9781] added IUser#createDomain
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java 2011-09-28 12:41:38 UTC (rev 35114)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java 2011-09-28 13:23:13 UTC (rev 35115)
@@ -24,7 +24,7 @@
public String getUUID() throws OpenshiftException;
- public IDomain createDomain(String name) throws OpenshiftException;
+ public IDomain createDomain(String name, ISSHPublicKey key) throws OpenshiftException;
public IDomain getDomain() throws OpenshiftException;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/IOpenshiftService.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/IOpenshiftService.java 2011-09-28 12:41:38 UTC (rev 35114)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/IOpenshiftService.java 2011-09-28 13:23:13 UTC (rev 35115)
@@ -23,6 +23,8 @@
*/
public interface IOpenshiftService {
+ public static final String BASE_URL = "https://openshift.redhat.com/broker";
+
public List<ICartridge> getCartridges(InternalUser user) throws OpenshiftException;
public Application createApplication(String name, ICartridge cartridge, InternalUser user) throws OpenshiftException;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java 2011-09-28 12:41:38 UTC (rev 35114)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java 2011-09-28 13:23:13 UTC (rev 35115)
@@ -53,8 +53,8 @@
}
@Override
- public IDomain createDomain(String name) throws OpenshiftException {
- ISSHPublicKey key = getSshKey();
+ public IDomain createDomain(String name, ISSHPublicKey key) throws OpenshiftException {
+ setSshKey(key);
this.domain = getService().createDomain(name, key, this);
return domain;
}
@@ -69,10 +69,14 @@
return domain;
}
+ private void setSshKey(ISSHPublicKey key) {
+ this.sshKey = key;
+ }
+
@Override
public ISSHPublicKey getSshKey() throws OpenshiftException {
if (sshKey == null) {
- sshKey = getUserInfo().getSshPublicKey();
+ this.sshKey = getUserInfo().getSshPublicKey();
}
return sshKey;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/OpenshiftService.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/OpenshiftService.java 2011-09-28 12:41:38 UTC (rev 35114)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/OpenshiftService.java 2011-09-28 13:23:13 UTC (rev 35115)
@@ -50,12 +50,20 @@
*/
public class OpenshiftService implements IOpenshiftService {
- private static final String BASE_URL = "https://openshift.redhat.com/broker";
+ private String baseUrl;
+ public OpenshiftService() {
+ this(BASE_URL);
+ }
+
+ protected OpenshiftService(String baseUrl) {
+ this.baseUrl = baseUrl;
+ }
+
@Override
public UserInfo getUserInfo(InternalUser user) throws OpenshiftException {
UserInfoRequest request = new UserInfoRequest(user.getRhlogin(), true);
- String url = request.getUrlString(BASE_URL);
+ String url = request.getUrlString(baseUrl);
try {
String requestString = new UserInfoRequestJsonMarshaller().marshall(request);
String openShiftRequestString = new OpenshiftEnvelopeFactory(user.getPassword(), requestString)
@@ -106,7 +114,7 @@
}
protected IDomain requestDomainAction(AbstractDomainRequest request, InternalUser user) throws OpenshiftException {
- String url = request.getUrlString(BASE_URL);
+ String url = request.getUrlString(baseUrl);
try {
String requestString =
new OpenshiftEnvelopeFactory(
@@ -161,7 +169,7 @@
public String getStatus(String applicationName, ICartridge cartridge, InternalUser user) throws OpenshiftException {
ApplicationRequest applicationRequest =
new ApplicationRequest(applicationName, cartridge, ApplicationAction.STATUS, user.getRhlogin(), true);
- String url = applicationRequest.getUrlString(BASE_URL);
+ String url = applicationRequest.getUrlString(baseUrl);
try {
String applicationRequestString =
new ApplicationRequestJsonMarshaller().marshall(applicationRequest);
@@ -191,7 +199,7 @@
protected Application requestApplicationAction(ApplicationRequest applicationRequest, InternalUser user)
throws OpenshiftException {
- String url = applicationRequest.getUrlString(BASE_URL);
+ String url = applicationRequest.getUrlString(baseUrl);
try {
String applicationRequestString =
new ApplicationRequestJsonMarshaller().marshall(applicationRequest);
Added: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/IOpenshiftTestService.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/IOpenshiftTestService.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/IOpenshiftTestService.java 2011-09-28 13:23:13 UTC (rev 35115)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.ide.eclipse.as.openshift.test.internal.core;
+
+import org.jboss.ide.eclipse.as.openshift.core.internal.IOpenshiftService;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IOpenshiftTestService extends IOpenshiftService {
+
+ public static final String STAGING_BASE_URL = "";
+
+}
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/IOpenshiftTestService.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/NoopOpenshiftServiceFake.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/NoopOpenshiftServiceFake.java 2011-09-28 12:41:38 UTC (rev 35114)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/NoopOpenshiftServiceFake.java 2011-09-28 13:23:13 UTC (rev 35115)
@@ -18,14 +18,13 @@
import org.jboss.ide.eclipse.as.openshift.core.ISSHPublicKey;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
import org.jboss.ide.eclipse.as.openshift.core.internal.Application;
-import org.jboss.ide.eclipse.as.openshift.core.internal.OpenshiftService;
import org.jboss.ide.eclipse.as.openshift.core.internal.InternalUser;
import org.jboss.ide.eclipse.as.openshift.core.internal.UserInfo;
/**
* @author André Dietisheim
*/
-public class NoopOpenshiftServiceFake extends OpenshiftService {
+public class NoopOpenshiftServiceFake extends OpenshiftTestService {
@Override
public UserInfo getUserInfo(InternalUser user) throws OpenshiftException {
Added: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/OpenshiftTestService.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/OpenshiftTestService.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/OpenshiftTestService.java 2011-09-28 13:23:13 UTC (rev 35115)
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.ide.eclipse.as.openshift.test.internal.core.fakes;
+
+import org.jboss.ide.eclipse.as.openshift.core.internal.OpenshiftService;
+import org.jboss.ide.eclipse.as.openshift.test.internal.core.IOpenshiftTestService;
+
+public class OpenshiftTestService extends OpenshiftService implements IOpenshiftTestService {
+
+ public OpenshiftTestService() {
+ super(STAGING_BASE_URL);
+ }
+}
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/fakes/OpenshiftTestService.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 2 months
JBoss Tools SVN: r35114 - branches/dead.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-09-28 08:41:38 -0400 (Wed, 28 Sep 2011)
New Revision: 35114
Added:
branches/dead/hibernatetools-multiversion2/
Log:
Another attempt to support multiple hibernate versions
14 years, 2 months
JBoss Tools SVN: r35113 - branches/dead.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-09-28 08:40:26 -0400 (Wed, 28 Sep 2011)
New Revision: 35113
Removed:
branches/dead/hibernatetools-multiversion2/
Log:
14 years, 2 months
JBoss Tools SVN: r35112 - branches/dead.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-09-28 08:33:46 -0400 (Wed, 28 Sep 2011)
New Revision: 35112
Added:
branches/dead/hibernatetools-multiversion2/
Log:
New Attempt to support many hibernate versions
14 years, 2 months
JBoss Tools SVN: r35111 - trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-09-28 06:42:46 -0400 (Wed, 28 Sep 2011)
New Revision: 35111
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java
Log:
[JBIDE-9781] added IUser#createDomain
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java 2011-09-28 10:41:52 UTC (rev 35110)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java 2011-09-28 10:42:46 UTC (rev 35111)
@@ -20,12 +20,12 @@
public String getRhlogin();
- public IDomain createDomain(String name) throws OpenshiftException;
-
public String getPassword();
public String getUUID() throws OpenshiftException;
+ public IDomain createDomain(String name) throws OpenshiftException;
+
public IDomain getDomain() throws OpenshiftException;
public ISSHPublicKey getSshKey() throws OpenshiftException;
14 years, 2 months
JBoss Tools SVN: r35110 - in trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core: internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-09-28 06:41:52 -0400 (Wed, 28 Sep 2011)
New Revision: 35110
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java
Log:
[JBIDE-9781] added User#createDomain
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java 2011-09-28 10:41:10 UTC (rev 35109)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IUser.java 2011-09-28 10:41:52 UTC (rev 35110)
@@ -20,6 +20,8 @@
public String getRhlogin();
+ public IDomain createDomain(String name) throws OpenshiftException;
+
public String getPassword();
public String getUUID() throws OpenshiftException;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java 2011-09-28 10:41:10 UTC (rev 35109)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java 2011-09-28 10:41:52 UTC (rev 35110)
@@ -30,7 +30,7 @@
private String rhlogin;
private String password;
private ISSHPublicKey sshKey;
- private Domain domain;
+ private IDomain domain;
private UserInfo userInfo;
private List<ICartridge> cartridges;
private List<IApplication> applications = new ArrayList<IApplication>();
@@ -53,6 +53,13 @@
}
@Override
+ public IDomain createDomain(String name) throws OpenshiftException {
+ ISSHPublicKey key = getSshKey();
+ this.domain = getService().createDomain(name, key, this);
+ return domain;
+ }
+
+ @Override
public IDomain getDomain() throws OpenshiftException {
if (domain == null) {
this.domain = new Domain(
14 years, 2 months
JBoss Tools SVN: r35109 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-09-28 06:41:10 -0400 (Wed, 28 Sep 2011)
New Revision: 35109
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/welcome.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/welcome.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent2/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent2/templates/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent2/templates/main-web-content2.xhtml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-9753 : multiple content web roots seem to confuse VPE
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2011-09-28 10:32:56 UTC (rev 35108)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2011-09-28 10:41:10 UTC (rev 35109)
@@ -270,16 +270,16 @@
.replaceFirst(
"^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}", Constants.EMPTY); //$NON-NLS-1$
- IFile file = null;
+ IFile baseFile = null;
if (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null
&&(pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage() instanceof IFile)) {
- file = (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo()
+ baseFile = (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo()
.getStorage();
}
- if (file == null)
+ if (baseFile == null)
return resolvedValue;
- resolvedValue = ElServiceUtil.replaceEl(file, resolvedValue);
+ resolvedValue = ElServiceUtil.replaceEl(baseFile, resolvedValue);
URI uri = null;
try {
@@ -291,9 +291,14 @@
&& (uri.isAbsolute() || (new File(resolvedValue)).exists()))
return resolvedValue;
- return Constants.FILE_PREFIX
- + FileUtil.getFile(resolvedValue, file).getLocation()
- .toPortableString();
+
+
+ IFile resolvedFile = FileUtil.getFile(resolvedValue, baseFile);
+ if (resolvedFile != null ) {
+ return Constants.FILE_PREFIX + resolvedFile.getLocation().toPortableString();
+ } else {
+ return resolvedValue;
+ }
}
/**
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.component 2011-09-28 10:32:56 UTC (rev 35108)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.component 2011-09-28 10:41:10 UTC (rev 35109)
@@ -2,6 +2,7 @@
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="jsf2Test">
<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/" source-path="/WebContent2"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
<property name="java-output-path" value="build/classes"/>
<property name="context-root" value="jsf2Test"/>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/welcome.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/welcome.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/welcome.xhtml 2011-09-28 10:41:10 UTC (rev 35109)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <ui:composition template="/templates/main-web-content2.xhtml" id="jbide9753">
+ <ui:define name="body">
+ Welcome To RichFaces 4.x Demo
+ </ui:define>
+
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/welcome.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/welcome.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/9753/welcome.xhtml.xml 2011-09-28 10:41:10 UTC (rev 35109)
@@ -0,0 +1,211 @@
+<tests>
+ <test id="jbide9753">
+
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
+ </SPAN>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ <DIV STYLE="-moz-user-modify: read-only;">
+ </DIV>
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ CLASS="rich-page #{cc.attrs.pageClass}" STYLE="-moz-user-modify: read-only;">
+ <TBODY STYLE="-moz-user-modify: read-only;">
+ <TR STYLE="-moz-user-modify: read-only;">
+ <TD CLASS="header_bg" STYLE="-moz-user-modify: read-only;">
+ <DIV CLASS="header_content rich-page-header #{cc.attrs.headerClass}" STYLE="-moz-user-modify: read-only;">
+ <SPAN STYLE="display: none; -moz-user-modify: read-only;">
+ </SPAN>
+ </DIV>
+ </TD>
+ </TR>
+ <TR STYLE="-moz-user-modify: read-only;">
+ <TD WIDTH="100%" HEIGHT="100%" CLASS="bg_tabbody"
+ STYLE="-moz-user-modify: read-only;">
+ <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING="0"
+ CELLPADDING="0" BORDER="0"
+ CLASS="rich-page-content #{cc.attrs.contentClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <TBODY STYLE="-moz-user-modify: read-only;">
+ <TR STYLE="-moz-user-modify: read-only;">
+ <TD CLASS="menu_col rich-page-sidebar #{cc.attrs.sidebarClass}" STYLE="-moz-user-modify: read-only;">
+ <DIV CLASS="menu_width spacer" STYLE="-moz-user-modify: read-only;">
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+
+ </DIV>
+ <SPAN STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV
+ STYLE="display: none; -moz-user-modify: read-only;">
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV
+ CLASS="rich-panel #{compositeComponent.attrs.styleClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV
+ CLASS="rich-panel-header #{compositeComponent.attrs.headerClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN STYLE="-moz-user-modify: read-only;">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">
+ Navigation
+</SPAN>
+ </SPAN>
+ </DIV>
+ </SPAN>
+ <DIV
+ CLASS="rich-panel-body #{compositeComponent.attrs.bodyClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <TABLE BORDER="0"
+ STYLE="-moz-user-modify: read-only;">
+ <TBODY>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:ajax</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:jsFunction</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:mediaOutput</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:push</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:status</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:outputPanel</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:commandButton</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:commandLink</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:log</SPAN>
+ </A>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </SPAN>
+ </TD>
+ <TD
+ CLASS="content_col rich-page-body #{cc.attrs.bodyClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN CLASS="vpe-text">
+ Welcome To RichFaces 4.x Demo
+</SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR STYLE="-moz-user-modify: read-only;">
+ <TD CLASS="footer_bg" STYLE="-moz-user-modify: read-only;">
+ <DIV
+ CLASS="footer_bg_content rich-page-footer #{cc.attrs.footerClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN STYLE="display: none; -moz-user-modify: read-only;">
+ </SPAN>
+ </DIV>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent2/templates/main-web-content2.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent2/templates/main-web-content2.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent2/templates/main-web-content2.xhtml 2011-09-28 10:41:10 UTC (rev 35109)
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+<h:head>
+</h:head>
+<h:body>
+ <ui:composition>
+ <rich:page id="page">
+ <f:facet name="header">
+ <h1>Welcome to RichFaces demo!</h1>
+ </f:facet>
+ <f:facet name="sidebar">
+ <ui:include src="/templates/includes/navigation.xhtml" />
+ </f:facet>
+ <ui:insert name="body">
+ Body content missed
+ </ui:insert>
+ <f:facet name="footer">
+ footer
+ </f:facet>
+ </rich:page>
+ </ui:composition>
+</h:body>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java 2011-09-28 10:32:56 UTC (rev 35108)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java 2011-09-28 10:41:10 UTC (rev 35109)
@@ -68,6 +68,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JsfJbide2362Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.MessageResolutionInPreviewTabTest;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.MozDirtyTest_JBIDE5105;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.MultipleWebRootFoldersTest_JBIDE9753;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.NullPointerWithStyleProperty_JBIDE5193;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.OpenOnCssClassTest_JBIDE4775;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.OpenOnInJarPackageFragment_JBIDE5682;
@@ -105,6 +106,7 @@
suite.addTestSuite(UnclosedELExpressionTest.class);
suite.addTestSuite(TestContextPathResolution.class);
suite.addTestSuite(JBIDE5920Test.class);
+ suite.addTestSuite(MultipleWebRootFoldersTest_JBIDE9753.class);
suite.addTestSuite(RenderFacetAndInsertChildrenTest.class);
suite.addTestSuite(EditFontFamilyTest_JBIDE5872.class);
suite.addTestSuite(ChangeMessageBundleTest_JBIDE5818.class);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2011-09-28 10:32:56 UTC (rev 35108)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2011-09-28 10:41:10 UTC (rev 35109)
@@ -60,6 +60,7 @@
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.resref.core.ResourceReference;
+import org.jboss.tools.jst.web.WebUtils;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeIncludeInfo;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
@@ -270,9 +271,15 @@
} else {
//WebArtifactEdit edit = WebArtifactEdit
// .getWebArtifactEditForRead(includeFile.getProject());
- IFolder defaultWebRootFolder = getDefaultWebRootFolder(includeFile);
- if (defaultWebRootFolder != null) {
- file = defaultWebRootFolder.getFile(fileName);
+ IContainer[] webRootFolders = WebUtils.getWebRootFolders(includeFile.getProject());
+ if (webRootFolders != null) {
+ for (IContainer webRootFolder : webRootFolders) {
+ IFile handle = webRootFolder.getFile(new Path(fileName));
+ if (handle.exists()) {
+ file = handle;
+ break;
+ }
+ }
} else {
/* Yahor Radtsevich (yradtsevich):
* Fix of JBIDE-4416: assume that the parent directory
@@ -302,14 +309,11 @@
return null;
}
- IVirtualComponent component = ComponentCore.createComponent(project);
- if (component == null) {
- return null;
+ IContainer[] webRootFolders = WebUtils.getWebRootFolders(project);
+ IPath defaultWebRootPath = null;
+ if (webRootFolders != null && webRootFolders.length > 0) {
+ defaultWebRootPath = webRootFolders[0].getFullPath();
}
-
- IVirtualFolder webRootFolder = component.getRootFolder()
- .getFolder(new Path("/")); //$NON-NLS-1$
- IPath defaultWebRootPath = webRootFolder.getUnderlyingFolder().getFullPath();
if (defaultWebRootPath == null) {
return null;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2011-09-28 10:32:56 UTC (rev 35108)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2011-09-28 10:41:10 UTC (rev 35109)
@@ -772,12 +772,12 @@
return Integer.toString(position) + PX_STRING;
}
- public static String processUrl(String url, IFile file) {
+ public static String processUrl(String url, IFile baseFile) {
String resolvedUrl = url.replaceFirst(
"^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}", Constants.EMPTY); //$NON-NLS-1$
- resolvedUrl = ElServiceUtil.replaceEl(file, resolvedUrl);
+ resolvedUrl = ElServiceUtil.replaceEl(baseFile, resolvedUrl);
URI uri = null;
try {
@@ -796,14 +796,14 @@
Path path = new Path(decodedUrl);
if (decodedUrl.startsWith("/") //$NON-NLS-1$
- && path.segment(0).equals(file.getProject().getName())) {
+ && path.segment(0).equals(baseFile.getProject().getName())) {
decodedUrl = "/" //$NON-NLS-1$
+ path.removeFirstSegments(1).toPortableString();
}
- IPath location = FileUtil.getFile(decodedUrl, file).getLocation();
- if (location != null) {
- return pathToUrl(location);
+ IFile file = FileUtil.getFile(decodedUrl, baseFile);
+ if (file != null && file.getLocation() != null) {
+ return pathToUrl(file.getLocation());
}
return resolvedUrl;
}
14 years, 2 months