JBoss Tools SVN: r36681 - trunk/jsf/features/org.jboss.tools.richfaces.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-11-27 18:48:59 -0500 (Sun, 27 Nov 2011)
New Revision: 36681
Modified:
trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml
Log:
removed match attribute from include tag
Modified: trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml
===================================================================
--- trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml 2011-11-27 19:55:36 UTC (rev 36680)
+++ trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml 2011-11-27 23:48:59 UTC (rev 36681)
@@ -1,28 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
-<feature id="org.jboss.tools.richfaces.feature" label="%featureName" version="3.3.0.qualifier" provider-name="%providerName" plugin="org.jboss.tools.vpe">
+<feature
+ id="org.jboss.tools.richfaces.feature"
+ label="%featureName"
+ version="3.3.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.vpe">
- <description url="http://www.jboss.org/tools">
+ <description url="http://www.jboss.org/tools">
%description
</description>
- <copyright>
+ <copyright>
%copyright
</copyright>
- <license url="license.html">
+ <license url="license.html">
Red Hat, Inc. licenses these features and plugins to you under certain open source licenses (or aggregations of such licenses), which in a particular case may include the Eclipse Public License, the GNU Lesser General Public License, and/or certain other open source licenses. For precise licensing details, consult the corresponding source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, Raleigh NC 27606 USA.
- </license>
+ </license>
- <includes id="org.jboss.tools.common.feature" version="3.3.0" match="greaterOrEqual" />
- <includes id="org.jboss.tools.common.core.feature" version="3.3.0" match="greaterOrEqual" />
- <includes id="org.jboss.tools.common.text.ext.feature" version="3.3.0" match="greaterOrEqual" />
- <includes id="org.jboss.tools.common.ui.feature" version="3.3.0" match="greaterOrEqual" />
- <includes id="org.jboss.tools.common.verification.feature" version="3.3.0" match="greaterOrEqual" />
- <includes id="org.jboss.tools.jsf.feature" version="3.3.0" match="greaterOrEqual" />
- <includes id="org.jboss.tools.jst.feature" version="3.3.0" match="greaterOrEqual" />
- <includes id="org.jboss.tools.vpe.feature" version="3.3.0" match="greaterOrEqual" />
-
- <requires>
- <import plugin="org.jboss.tools.xulrunner.initializer" version="3.1.0" match="greaterOrEqual" />
- </requires>
+ <includes
+ id="org.jboss.tools.common.feature"
+ version="3.3.0" />
+
+ <includes
+ id="org.jboss.tools.common.core.feature"
+ version="3.3.0" />
+
+ <includes
+ id="org.jboss.tools.common.text.ext.feature"
+ version="3.3.0" />
+
+ <includes
+ id="org.jboss.tools.common.ui.feature"
+ version="3.3.0" />
+
+ <includes
+ id="org.jboss.tools.common.verification.feature"
+ version="3.3.0" />
+
+ <includes
+ id="org.jboss.tools.jsf.feature"
+ version="3.3.0" />
+
+ <includes
+ id="org.jboss.tools.jst.feature"
+ version="3.3.0" />
+
+ <includes
+ id="org.jboss.tools.vpe.feature"
+ version="3.3.0" />
+
+ <requires>
+ <import plugin="org.jboss.tools.xulrunner.initializer" version="3.1.0" match="greaterOrEqual"/>
+ </requires>
+
</feature>
13 years, 1 month
JBoss Tools SVN: r36679 - in trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples: model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-27 10:05:58 -0500 (Sun, 27 Nov 2011)
New Revision: 36679
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java
Log:
JBIDE-10243 Improve cheatsheets
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2011-11-27 15:05:01 UTC (rev 36678)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2011-11-27 15:05:58 UTC (rev 36679)
@@ -102,6 +102,8 @@
*/
public class ProjectExamplesActivator extends AbstractUIPlugin {
+ private static final String README_HTML = "/readme.html";
+ private static final String CHEATSHEET_XML = "/cheatsheet.xml"; //$NON-NLS-1$
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.project.examples"; //$NON-NLS-1$
public static final String ALL_SITES = Messages.ProjectExamplesActivator_All;
@@ -373,6 +375,7 @@
return;
}
for(final Project project:projects) {
+ fixWelcome(project);
if (project.isWelcome()) {
String urlString = project.getWelcomeURL();
urlString = replace(urlString, project);
@@ -430,6 +433,41 @@
}
}
+ private static void fixWelcome(Project project) {
+ if (project == null || project.isWelcome()) {
+ return;
+ }
+ List<String> includedProjects = project.getIncludedProjects();
+ if (includedProjects == null || includedProjects.size() <= 0) {
+ return;
+ }
+ String projectName = includedProjects.get(0);
+ if (projectName == null || projectName.isEmpty()) {
+ return;
+ }
+ IProject eclipseProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (eclipseProject == null || !eclipseProject.exists()) {
+ return;
+ }
+ if (checkCheatsheet(project, eclipseProject, CHEATSHEET_XML, ProjectUtil.CHEATSHEETS)) {
+ return;
+ }
+ checkCheatsheet(project, eclipseProject, README_HTML, ProjectUtil.EDITOR);
+
+ }
+
+ private static boolean checkCheatsheet(Project project,
+ IProject eclipseProject, String path, String type) {
+ IResource cheatsheet = eclipseProject.findMember(path);
+ if (cheatsheet != null && cheatsheet.exists() && cheatsheet.getType() == IResource.FILE) {
+ project.setWelcome(true);
+ project.setType(type);
+ project.setWelcomeURL(cheatsheet.getFullPath().toString());
+ return true;
+ }
+ return false;
+ }
+
public static boolean extractZipFile(File file, File destination,
IProgressMonitor monitor) {
ZipFile zipFile = null;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java 2011-11-27 15:05:01 UTC (rev 36678)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java 2011-11-27 15:05:58 UTC (rev 36679)
@@ -72,7 +72,7 @@
private static final String SITE = "site"; //$NON-NLS-1$
- private static final String EDITOR = "editor"; //$NON-NLS-1$
+ public static final String EDITOR = "editor"; //$NON-NLS-1$
public static final String CHEATSHEETS = "cheatsheets"; //$NON-NLS-1$
13 years, 1 month
JBoss Tools SVN: r36678 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-27 10:05:01 -0500 (Sun, 27 Nov 2011)
New Revision: 36678
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
Log:
JBIDE-10131 Project Examples only check if there is a runtime not if there is a server setup
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2011-11-26 14:28:07 UTC (rev 36677)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2011-11-27 15:05:01 UTC (rev 36678)
@@ -35,7 +35,10 @@
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerType;
import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.internal.RuntimeType;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
@@ -191,6 +194,11 @@
if (runtimes.length > 0
&& ProjectFix.ANY.equals(allowedType)) {
for (IRuntime runtime:runtimes) {
+ // https://issues.jboss.org/browse/JBIDE-10131
+ IServer server = getServer(runtime);
+ if (server == null) {
+ continue;
+ }
IRuntime componentPresent = isComponentPresent(fix, runtime);
if (componentPresent != null) {
return isComponentPresent(fix, runtime);
@@ -200,6 +208,11 @@
}
for (int i = 0; i < runtimes.length; i++) {
IRuntime runtime = runtimes[i];
+ // https://issues.jboss.org/browse/JBIDE-10131
+ IServer server = getServer(runtime);
+ if (server == null) {
+ continue;
+ }
IRuntimeType runtimeType = runtime.getRuntimeType();
if (runtimeType != null && runtimeType.getId().equals(allowedType)) {
IRuntime componentPresent = isComponentPresent(fix, runtime);
@@ -212,6 +225,31 @@
return null;
}
+ private IServer getServer(IRuntime runtime) {
+ if (runtime == null) {
+ return null;
+ }
+ IRuntimeType runtimeType = runtime.getRuntimeType();
+ if (runtimeType == null || runtimeType.getId() == null) {
+ return null;
+ }
+ IServer[] servers = ServerCore.getServers();
+ for (IServer server:servers) {
+ IServerType serverType = server.getServerType();
+ if (serverType == null) {
+ continue;
+ }
+ IRuntimeType serverRuntimeType = serverType.getRuntimeType();
+ if (serverRuntimeType == null) {
+ continue;
+ }
+ if (runtimeType.getId().equals(serverRuntimeType.getId())) {
+ return server;
+ }
+ }
+ return null;
+ }
+
private IRuntime isComponentPresent(ProjectFix fix, IRuntime runtime) {
String required_components = fix.getProperties().get(REQUIRED_COMPONENTS);
if (required_components == null) {
13 years, 1 month
JBoss Tools SVN: r36677 - in trunk: examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-26 09:28:07 -0500 (Sat, 26 Nov 2011)
New Revision: 36677
Removed:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/job/
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java
trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Category.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/IImportProjectExample.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ImportDefaultMavenProjectExample.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/MavenProjectExamplesActivator.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java
Log:
JBIDE-9863 ProjectExamplesFix assumes the Eclipse project name is identical to the Example name
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2011-11-26 14:28:07 UTC (rev 36677)
@@ -40,7 +40,6 @@
org.jboss.tools.project.examples.dialog.xpl,
org.jboss.tools.project.examples.filetransfer,
org.jboss.tools.project.examples.fixes,
- org.jboss.tools.project.examples.job,
org.jboss.tools.project.examples.model,
org.jboss.tools.project.examples.preferences,
org.jboss.tools.project.examples.wizard
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -21,6 +21,7 @@
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -245,14 +246,18 @@
if (pName == null) {
List<String> projectNames = project.getIncludedProjects();
List<IProject> projects = new ArrayList<IProject>();
- for (String projectName:projectNames) {
- IProject eclipseProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (eclipseProject != null && eclipseProject.isOpen()) {
- projects.add(eclipseProject);
+ if (projectNames != null) {
+ for (String projectName : projectNames) {
+ IProject eclipseProject = ResourcesPlugin.getWorkspace()
+ .getRoot().getProject(projectName);
+ if (eclipseProject != null && eclipseProject.isOpen()) {
+ projects.add(eclipseProject);
+ }
}
}
return projects.toArray(new IProject[0]);
}
+ pName = replace(pName, project);
StringTokenizer tokenizer = new StringTokenizer(pName,","); //$NON-NLS-1$
List<IProject> projects = new ArrayList<IProject>();
while (tokenizer.hasMoreTokens()) {
@@ -267,6 +272,19 @@
return projects.toArray(new IProject[0]);
}
+ protected static String replace(String name, Project project) {
+ List<String> includedProjects = project.getIncludedProjects();
+ if (includedProjects != null) {
+ int i = 0;
+ for (String includedProject : includedProjects) {
+ String expression = "${project[" + i + "]}"; //$NON-NLS-1$ //$NON-NLS-2$
+ name = name.replace(expression, includedProject);
+ i++;
+ }
+ }
+ return name;
+ }
+
public IImportProjectExample getImportProjectExample(String importType) {
initImportProjectExamples();
if (importType == null) {
@@ -357,6 +375,7 @@
for(final Project project:projects) {
if (project.isWelcome()) {
String urlString = project.getWelcomeURL();
+ urlString = replace(urlString, project);
URL url = null;
if (urlString.startsWith("/")) { //$NON-NLS-1$
IPath path = new Path(urlString);
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Category.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Category.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Category.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -47,11 +47,29 @@
this.projects = projects;
}
+ public String getDescription() {
+ return getName();
+ }
+
+ public String getShortDescription() {
+ return getName();
+ }
+
+ public IProjectExampleSite getSite() {
+ return site;
+ }
+
@Override
+ public void setSite(IProjectExampleSite site) {
+ this.site = site;
+ }
+
+ @Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((site == null) ? 0 : site.hashCode());
return result;
}
@@ -69,24 +87,12 @@
return false;
} else if (!name.equals(other.name))
return false;
+ if (site == null) {
+ if (other.site != null)
+ return false;
+ } else if (!site.equals(other.site))
+ return false;
return true;
}
- public String getDescription() {
- return getName();
- }
-
- public String getShortDescription() {
- return getName();
- }
-
- public IProjectExampleSite getSite() {
- return site;
- }
-
- @Override
- public void setSite(IProjectExampleSite site) {
- this.site = site;
- }
-
}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/IImportProjectExample.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/IImportProjectExample.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/IImportProjectExample.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -22,7 +22,7 @@
*/
public interface IImportProjectExample {
- List<Project> importProject(Project projectDescription, File file,
+ boolean importProject(Project projectDescription, File file,
IProgressMonitor monitor) throws Exception;
void fix(Project project, IProgressMonitor monitor);
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -270,7 +270,10 @@
String value = getContent(child);
boolean found = false;
for (Category cat : list) {
- if (cat.getName().equals(value)) {
+ if (cat.getSite() == null) {
+ cat.setSite(site);
+ }
+ if (cat.getName().equals(value) && site.getName().equals(cat.getSite().getName())) {
category = cat;
found = true;
break;
@@ -282,6 +285,7 @@
list.add(category);
}
project.setCategory(category);
+ category.getProjects().add(project);
}
else if (nodeName.equals(NAME)) {
project.setName(getContent(child));
@@ -352,7 +356,6 @@
}
}
}
- category.getProjects().add(project);
}
}
} catch (Exception e) {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ImportDefaultMavenProjectExample.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ImportDefaultMavenProjectExample.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ImportDefaultMavenProjectExample.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -46,13 +46,13 @@
};
@Override
- public List<Project> importProject(Project projectDescription, File file,
+ public boolean importProject(Project projectDescription, File file,
IProgressMonitor monitor) throws Exception {
List<Project> projects = new ArrayList<Project>();
if (projectDescription.getIncludedProjects() == null) {
- importSingleProject(projectDescription, file, monitor);
+ boolean ret = importSingleProject(projectDescription, file, monitor);
projects.add(projectDescription);
- return projects;
+ return ret;
} else {
List<String> projectNames = projectDescription.getIncludedProjects();
for (final String projectName : projectNames) {
@@ -70,7 +70,7 @@
});
if (!ret[0]) {
- return projects;
+ return false;
}
project.delete(true, true, monitor);
}
@@ -109,15 +109,16 @@
}
} catch (Exception e) {
ProjectExamplesActivator.log(e);
+ return false;
}
}
reconfigure(project, monitor);
}
}
- return projects;
+ return true;
}
- private void importSingleProject(Project projectDescription, File file,
+ private boolean importSingleProject(Project projectDescription, File file,
IProgressMonitor monitor) throws CoreException, ZipException,
IOException, InvocationTargetException, InterruptedException {
final String projectName = projectDescription.getName();
@@ -135,7 +136,7 @@
});
if (!ret[0]) {
- return;
+ return false;
}
project.delete(true, true, monitor);
}
@@ -174,10 +175,11 @@
}
} catch (Exception e) {
ProjectExamplesActivator.log(e);
+ return false;
}
}
reconfigure(project, monitor);
-
+ return true;
}
private static Shell getActiveShell() {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -55,8 +55,9 @@
});
return Status.OK_STATUS;
}
- importProjectExample.importProject(project, project.getFile(), monitor);
- importProjectExample.fix(project, monitor);
+ if (importProjectExample.importProject(project, project.getFile(), monitor)) {
+ importProjectExample.fix(project, monitor);
+ }
}
} catch (final Exception e) {
Display.getDefault().syncExec(new Runnable() {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -16,6 +16,7 @@
import org.eclipse.jface.viewers.ViewerFilter;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.Category;
+import org.jboss.tools.project.examples.model.IProjectExampleSite;
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectModelElement;
@@ -44,9 +45,21 @@
if (site.equals(ProjectExamplesActivator.ALL_SITES)) {
size += category.getProjects().size();
} else {
+ IProjectExampleSite categorySite = category.getSite();
+ if (categorySite == null) {
+ return false;
+ }
+ if (!site.equals(categorySite.getName())) {
+ return false;
+ }
List<Project> projects = category.getProjects();
for (Project project:projects) {
- if (site.equals(project.getSite())) {
+ IProjectExampleSite projectSite = project.getSite();
+ if (projectSite == null) {
+ continue;
+ }
+
+ if (site.equals(projectSite.getName())) {
size++;
}
}
@@ -54,7 +67,10 @@
return size > 0;
}
ProjectModelElement model = (ProjectModelElement) element;
- if ( site.equals(ProjectExamplesActivator.ALL_SITES) || site.equals(model.getSite())) {
+ if (model.getSite() == null) {
+ return false;
+ }
+ if ( site.equals(ProjectExamplesActivator.ALL_SITES) || site.equals(model.getSite().getName())) {
return true;
}
return false;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -97,8 +97,9 @@
setName(Messages.NewProjectExamplesWizard_Importing);
try {
IImportProjectExample importProjectExample = ProjectExamplesActivator.getDefault().getImportProjectExample(project.getImportType());
- importProjectExample.importProject(project, file, monitor);
- importProjectExample.fix(project, monitor);
+ if (importProjectExample.importProject(project, file, monitor)) {
+ importProjectExample.fix(project, monitor);
+ }
} catch (Exception e) {
IStatus status = new Status(IStatus.ERROR,Activator.PLUGIN_ID,e.getMessage(),e);
throw new CoreException(status);
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectTest.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -172,8 +172,9 @@
url, name, ".zip", monitor); //$NON-NLS-1$
assertNotNull(file);
IImportProjectExample importProjectExample = ProjectExamplesActivator.getDefault().getImportProjectExample(projectExample.getImportType());
- importProjectExample.importProject(projectExample, file, monitor);
- importProjectExample.fix(projectExample, monitor);
+ if (importProjectExample.importProject(projectExample, file, monitor)) {
+ importProjectExample.fix(projectExample, monitor);
+ }
}
@Test
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -11,15 +11,26 @@
package org.jboss.tools.maven.project.examples;
+
import java.io.File;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Set;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.project.LocalProjectScanner;
+import org.eclipse.m2e.core.project.MavenProjectInfo;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.maven.project.examples.wizard.ArchetypeExamplesWizard;
@@ -33,38 +44,91 @@
public class ImportMavenArchetypeProjectExample extends
AbstractImportProjectExample {
- private static final String UNNAMED_PROJECTS = "UnnamedProjects"; //$NON-NLS-1$
-
- //private static final String JBOSS_TOOLS_MAVEN_PROJECTS = "/.JBossToolsMavenProjects"; //$NON-NLS-1$
-
@Override
- public List<Project> importProject(final Project projectDescription, File file,
- IProgressMonitor monitor) throws Exception {
+ public boolean importProject(final Project projectDescription, File file,
+ final IProgressMonitor monitor) throws Exception {
List<Project> projects = new ArrayList<Project>();
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+ projects.add(projectDescription);
+ final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IPath rootPath = workspaceRoot.getLocation();
- IPath mavenProjectsRoot = rootPath; //.append(JBOSS_TOOLS_MAVEN_PROJECTS);
-// String projectName = projectDescription.getName();
-// if (projectName == null || projectName.isEmpty()) {
-// projectName = UNNAMED_PROJECTS;
-// }
- IPath path = mavenProjectsRoot; //.append(projectName);
+ IPath mavenProjectsRoot = rootPath;
+ IPath path = mavenProjectsRoot;
final File destination = new File(path.toOSString());
+ final boolean[] ret = new boolean[1];
+ ret[0] = true;
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
ArchetypeExamplesWizard wizard = new ArchetypeExamplesWizard(destination, projectDescription);
WizardDialog wizardDialog = new WizardDialog(getActiveShell(), wizard);
- wizardDialog.open();
+ int ok = wizardDialog.open();
+ if (ok != Window.OK) {
+ ret[0] = false;
+ return;
+ }
+ List<String> includedProjects = projectDescription.getIncludedProjects();
+ if (includedProjects == null) {
+ includedProjects = new ArrayList<String>();
+ projectDescription.setIncludedProjects(includedProjects);
+ }
+ projectDescription.getIncludedProjects().clear();
+ String projectName = wizard.getProjectName();
+ includedProjects.add(projectName);
+ IPath location = workspaceRoot.getLocation();
+ String artifactId = wizard.getArtifactId();
+ String projectFolder = location.append(artifactId).toFile()
+ .getAbsolutePath();
+ MavenModelManager mavenModelManager = MavenPlugin
+ .getMavenModelManager();
+ LocalProjectScanner scanner = new LocalProjectScanner(
+ workspaceRoot.getLocation().toFile(), //
+ projectFolder, true, mavenModelManager);
+ try {
+ scanner.run(monitor);
+ } catch (InterruptedException e1) {
+ ret[0] = false;
+ return;
+ }
+
+ Set<MavenProjectInfo> projectSet = collectProjects(scanner
+ .getProjects());
+ ProjectImportConfiguration importConfiguration = new ProjectImportConfiguration();
+ for (MavenProjectInfo info : projectSet) {
+ try {
+ projectName = MavenProjectExamplesActivator
+ .getProjectName(info, importConfiguration);
+ if (!includedProjects.contains(projectName)) {
+ includedProjects.add(projectName);
+ }
+ } catch (CoreException e) {
+ MavenProjectExamplesActivator.log(e);
+ ret[0] = false;
+ }
+ }
}
});
- return projects;
+ return ret[0];
}
-
+ public Set<MavenProjectInfo> collectProjects(
+ Collection<MavenProjectInfo> projects) {
+ return new LinkedHashSet<MavenProjectInfo>() {
+ private static final long serialVersionUID = 1L;
+
+ public Set<MavenProjectInfo> collectProjects(
+ Collection<MavenProjectInfo> projects) {
+ for (MavenProjectInfo projectInfo : projects) {
+ add(projectInfo);
+ collectProjects(projectInfo.getProjects());
+ }
+ return this;
+ }
+ }.collectProjects(projects);
+ }
+
private static Shell getActiveShell() {
return Display.getDefault().getActiveShell();
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -24,9 +24,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
@@ -38,9 +35,7 @@
import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.progress.IProgressConstants;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
-import org.jboss.tools.project.examples.job.ProjectExamplesJob;
import org.jboss.tools.project.examples.model.AbstractImportProjectExample;
import org.jboss.tools.project.examples.model.Project;
@@ -52,17 +47,16 @@
private static final String UNNAMED_PROJECTS = "UnnamedProjects"; //$NON-NLS-1$
- //private static final String JBOSS_TOOLS_MAVEN_PROJECTS = "/.JBossToolsMavenProjects"; //$NON-NLS-1$
-
private boolean confirm;
@Override
- public List<Project> importProject(Project projectDescription, File file,
+ public boolean importProject(Project projectDescription, File file,
IProgressMonitor monitor) throws Exception {
List<Project> projects = new ArrayList<Project>();
+ projects.add(projectDescription);
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IPath rootPath = workspaceRoot.getLocation();
- IPath mavenProjectsRoot = rootPath;//.append(JBOSS_TOOLS_MAVEN_PROJECTS);
+ IPath mavenProjectsRoot = rootPath;
String projectName = projectDescription.getName();
if (projectName == null || projectName.isEmpty()) {
projectName = UNNAMED_PROJECTS;
@@ -87,12 +81,12 @@
project.delete(false, true, monitor);
}
} else {
- return projects;
+ return false;
}
}
boolean deleted = deleteDirectory(destination, monitor);
if (monitor.isCanceled()) {
- return projects;
+ return false;
}
if (!deleted) {
Display.getDefault().syncExec(new Runnable() {
@@ -103,13 +97,13 @@
"Error", "Cannot delete the '" + destination + "' file.");
}
});
- return projects;
+ return false;
}
}
boolean ok = ProjectExamplesActivator.extractZipFile(file, destination, monitor);
monitor.setTaskName("");
if (monitor.isCanceled()) {
- return projects;
+ return false;
}
if (!ok) {
Display.getDefault().syncExec(new Runnable() {
@@ -121,78 +115,86 @@
"Cannot extract the archive.");
}
});
- return projects;
+ return false;
}
- importMavenProjects(destination, projectDescription);
- return projects;
+ List<String> projectNames = importMavenProjects(destination, projectDescription, monitor);
+ new OpenMavenConsoleAction().run();
+ projectDescription.getIncludedProjects().clear();
+ projectDescription.getIncludedProjects().addAll(projectNames);
+ return true;
}
- private void importMavenProjects(final File destination, final Project projectDescription) {
- Job job = new ProjectExamplesJob("Importing Maven projects") {
- public IStatus runInWorkspace(IProgressMonitor monitor) {
- setProperty(IProgressConstants.ACTION_PROPERTY,
- new OpenMavenConsoleAction());
- MavenPlugin plugin = MavenPlugin.getDefault();
- try {
- AbstractProjectScanner<MavenProjectInfo> projectScanner = getProjectScanner(destination);
- projectScanner.run(monitor);
- List<MavenProjectInfo> mavenProjects = projectScanner
- .getProjects();
- List<MavenProjectInfo> infos = new ArrayList<MavenProjectInfo>();
- infos.addAll(mavenProjects);
- addMavenProjects(infos, mavenProjects);
- final List<IProject> existingProjects = new ArrayList<IProject>();
- ProjectImportConfiguration importConfiguration = new ProjectImportConfiguration();
- String profiles = projectDescription.getDefaultProfiles();
- if (profiles != null && profiles.trim().length() > 0) {
- importConfiguration.getResolverConfiguration().setActiveProfiles(profiles);
- }
- for(MavenProjectInfo info:infos) {
- String projectName = getProjectName(info, importConfiguration);
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (project != null && project.exists()) {
- existingProjects.add(project);
- }
+ private List<String> importMavenProjects(final File destination,
+ final Project projectDescription, IProgressMonitor monitor) {
+ List<String> projectNames = new ArrayList<String>();
+ MavenPlugin plugin = MavenPlugin.getDefault();
+ try {
+ AbstractProjectScanner<MavenProjectInfo> projectScanner = getProjectScanner(destination);
+ projectScanner.run(monitor);
+ List<MavenProjectInfo> mavenProjects = projectScanner.getProjects();
+ List<MavenProjectInfo> infos = new ArrayList<MavenProjectInfo>();
+ infos.addAll(mavenProjects);
+ addMavenProjects(infos, mavenProjects);
+ final List<IProject> existingProjects = new ArrayList<IProject>();
+ ProjectImportConfiguration importConfiguration = new ProjectImportConfiguration();
+ String profiles = projectDescription.getDefaultProfiles();
+ if (profiles != null && profiles.trim().length() > 0) {
+ importConfiguration.getResolverConfiguration()
+ .setActiveProfiles(profiles);
+ }
+ for (MavenProjectInfo info : infos) {
+ String projectName = MavenProjectExamplesActivator.getProjectName(info, importConfiguration);
+ IProject project = ResourcesPlugin.getWorkspace().getRoot()
+ .getProject(projectName);
+ if (project != null && project.exists()) {
+ existingProjects.add(project);
+ }
+ }
+ if (existingProjects.size() > 0) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ String message = getWorkspaceMessage(existingProjects);
+
+ confirm = MessageDialog.openConfirm(getActiveShell(),
+ "Confirmation", message);
}
- if (existingProjects.size() > 0) {
- Display.getDefault().syncExec(new Runnable() {
-
- @Override
- public void run() {
- String message = getWorkspaceMessage(existingProjects);
-
- confirm = MessageDialog.openConfirm(getActiveShell(),
- "Confirmation", message);
- }
- });
- if (confirm) {
- for (IProject project:existingProjects) {
- try {
- project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- } catch (Exception e) {
- // ignore
- }
- project.delete(true, true, monitor);
- }
- } else {
- return Status.CANCEL_STATUS;
+ });
+ if (confirm) {
+ for (IProject project : existingProjects) {
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE,
+ monitor);
+ } catch (Exception e) {
+ // ignore
}
+ project.delete(true, true, monitor);
}
- MavenPlugin.getProjectConfigurationManager().importProjects(
- infos, importConfiguration, monitor);
- } catch (CoreException ex) {
- MavenProjectExamplesActivator.log(ex, "Projects imported with errors");
- return ex.getStatus();
- } catch (InterruptedException e) {
- return Status.CANCEL_STATUS;
+ } else {
+ return projectNames;
}
- return Status.OK_STATUS;
}
- };
- job.setRule(MavenPlugin.getDefault().getProjectConfigurationManager()
- .getRule());
- job.schedule();
+ MavenPlugin.getProjectConfigurationManager().importProjects(infos,
+ importConfiguration, monitor);
+ for (MavenProjectInfo info : infos) {
+ Model model = info.getModel();
+ if (model != null && model.getArtifactId() != null
+ && model.getArtifactId().trim().length() > 0) {
+ projectNames.add(model.getArtifactId());
+ }
+ }
+ } catch (CoreException ex) {
+ MavenProjectExamplesActivator.log(ex,
+ "Projects imported with errors");
+ return projectNames;
+ } catch (InterruptedException e) {
+ MavenProjectExamplesActivator.log(e,
+ "Projects imported with errors");
+ return projectNames;
+ }
+ return projectNames;
}
private List<MavenProjectInfo> addMavenProjects(List<MavenProjectInfo> infos, List<MavenProjectInfo> mavenProjects) {
@@ -245,38 +247,6 @@
return (path.delete());
}
- private String getProjectName(MavenProjectInfo projectInfo,
- ProjectImportConfiguration configuration) throws CoreException {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
-
- File pomFile = projectInfo.getPomFile();
- Model model = projectInfo.getModel();
- IMaven maven = MavenPlugin.getDefault().getMaven();
- if (model == null) {
- model = maven.readModel(pomFile);
- projectInfo.setModel(model);
- }
-
- String projectName = configuration.getProjectName(model);
-
- File projectDir = pomFile.getParentFile();
- String projectParent = projectDir.getParentFile().getAbsolutePath();
-
- if (projectInfo.getBasedirRename() == MavenProjectInfo.RENAME_REQUIRED) {
- File newProject = new File(projectDir.getParent(), projectName);
- if (!projectDir.equals(newProject)) {
- projectDir = newProject;
- }
- } else {
- if (projectParent.equals(root.getLocation().toFile()
- .getAbsolutePath())) {
- projectName = projectDir.getName();
- }
- }
- return projectName;
- }
-
private List<IProject> getExistingProjects(final File destination) {
List<IProject> existingProjects = new ArrayList<IProject>();
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/MavenProjectExamplesActivator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/MavenProjectExamplesActivator.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/MavenProjectExamplesActivator.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -1,7 +1,18 @@
package org.jboss.tools.maven.project.examples;
+import java.io.File;
+
+import org.apache.maven.model.Model;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.project.MavenProjectInfo;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -59,4 +70,36 @@
IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
getDefault().getLog().log(status);
}
+
+ public static String getProjectName(MavenProjectInfo projectInfo,
+ ProjectImportConfiguration configuration) throws CoreException {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IWorkspaceRoot root = workspace.getRoot();
+
+ File pomFile = projectInfo.getPomFile();
+ Model model = projectInfo.getModel();
+ IMaven maven = MavenPlugin.getMaven();
+ if (model == null) {
+ model = maven.readModel(pomFile);
+ projectInfo.setModel(model);
+ }
+
+ String projectName = configuration.getProjectName(model);
+
+ File projectDir = pomFile.getParentFile();
+ String projectParent = projectDir.getParentFile().getAbsolutePath();
+
+ if (projectInfo.getBasedirRename() == MavenProjectInfo.RENAME_REQUIRED) {
+ File newProject = new File(projectDir.getParent(), projectName);
+ if (!projectDir.equals(newProject)) {
+ projectDir = newProject;
+ }
+ } else {
+ if (projectParent.equals(root.getLocation().toFile()
+ .getAbsolutePath())) {
+ projectName = projectDir.getName();
+ }
+ }
+ return projectName;
+ }
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java 2011-11-26 13:08:52 UTC (rev 36676)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java 2011-11-26 14:28:07 UTC (rev 36677)
@@ -45,6 +45,8 @@
private File location;
private ProjectImportConfiguration configuration;
private ArchetypeExamplesWizardPage wizardPage;
+ private String projectName;
+ private String artifactId;
public ArchetypeExamplesWizard(File location, Project projectDescription) {
super();
@@ -63,12 +65,12 @@
public boolean performFinish() {
final Model model = wizardPage.getModel();
final String groupId = model.getGroupId();
- final String artifactId = model.getArtifactId();
+ artifactId = model.getArtifactId();
final String version = model.getVersion();
final String javaPackage = wizardPage.getJavaPackage();
final Properties properties = wizardPage.getProperties();
final Archetype archetype = wizardPage.getArchetype();
- final String projectName = configuration.getProjectName(model);
+ projectName = configuration.getProjectName(model);
final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
final IWorkspaceRunnable wr = new IWorkspaceRunnable() {
@@ -117,4 +119,12 @@
wizardPage = new ArchetypeExamplesWizardPage(configuration, projectDescription);
addPage(wizardPage);
}
+
+ public String getProjectName() {
+ return projectName;
+ }
+
+ public String getArtifactId() {
+ return artifactId;
+ }
}
13 years, 1 month
JBoss Tools SVN: r36676 - in trunk/maven/plugins/org.jboss.tools.maven.ui: src/org/jboss/tools/maven/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-11-26 08:08:52 -0500 (Sat, 26 Nov 2011)
New Revision: 36676
Added:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/OpenPageInBrowserMarkerResolution.java
Removed:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/JBossRepositoriesMarkerResolution.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/problems/
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/plugin.xml
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/MavenDependencyMarkerResolutionGenerator.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/messages.properties
Log:
JBIDE-9921: Add quickfixes for missing dependencies based on M2E error markers. Quickfixes will open documentation pages on jboss.org
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/plugin.xml 2011-11-25 19:55:09 UTC (rev 36675)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/plugin.xml 2011-11-26 13:08:52 UTC (rev 36676)
@@ -222,13 +222,18 @@
</perspectiveExtension>
</extension>
- <!-- TODO implement marker resolution as part of JBIDE-9921
- <extension
+ <extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
- class="org.jboss.tools.maven.ui.internal.problems.MavenDependencyMarkerResolutionGenerator"
+ class="org.jboss.tools.maven.ui.internal.markers.MavenDependencyMarkerResolutionGenerator"
markerType="org.eclipse.m2e.core.maven2Problem.dependency">
</markerResolutionGenerator>
</extension>
- -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.jboss.tools.maven.ui.internal.markers.MavenDependencyMarkerResolutionGenerator"
+ markerType="org.eclipse.m2e.core.maven2Problem.pomloading">
+ </markerResolutionGenerator>
+ </extension>
</plugin>
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java 2011-11-25 19:55:09 UTC (rev 36675)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java 2011-11-26 13:08:52 UTC (rev 36676)
@@ -84,6 +84,8 @@
public static String SelectProfilesDialog_Select_Maven_profiles;
public static String SelectProfilesDialog_Select_the_active_Maven_profiles;
public static String SelectProfilesDialog_SelectAll;
+ public static String Quickfix_setupCommunityRepo;
+ public static String Quickfix_setupEnterpriseRepo;
static {
// initialize resource bundle
Deleted: trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/JBossRepositoriesMarkerResolution.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/problems/JBossRepositoriesMarkerResolution.java 2011-11-25 13:21:37 UTC (rev 36660)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/JBossRepositoriesMarkerResolution.java 2011-11-26 13:08:52 UTC (rev 36676)
@@ -1,72 +0,0 @@
-/*************************************************************************************
- * Copyright (c) 2009-2011 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * JBoss by Red Hat - Initial implementation.
- ************************************************************************************/
-package org.jboss.tools.maven.ui.internal.problems;
-
-import static org.eclipse.m2e.core.ui.internal.editing.PomEdits.performOnDOMDocument;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Date;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.internal.compiler.util.Util;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.ui.internal.editing.PomEdits.Operation;
-import org.eclipse.m2e.core.ui.internal.editing.PomEdits.OperationTuple;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.ui.IMarkerResolution2;
-import org.w3c.dom.Document;
-
-public class JBossRepositoriesMarkerResolution implements IMarkerResolution,
- IMarkerResolution2 {
-
- public String getDescription() {
- return getLabel();
- }
-
- public Image getImage() {
- return null;
- }
-
- public String getLabel() {
- // TODO Auto-generated method stub
- return "Add missing JBoss repositories to settings.xml";
- }
-
- public void run(IMarker arg0) {
- Operation addRepos = new AddRepositoriesOperation();
- File settings = new File(MavenPlugin.getMavenConfiguration().getUserSettingsFile());
- try {
- String content = new String(Util.getFileCharContent(settings, null));
- IDocument settingsDoc = new org.eclipse.jface.text.Document(content);
- performOnDOMDocument(new OperationTuple(settingsDoc, addRepos));
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
-
- class AddRepositoriesOperation implements Operation {
-
- public void process(Document document) {
- document.createComment("Changing settings at "+new Date());
- System.err.println("Resolving repository stuff");
- }
-
- }
-}
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/MavenDependencyMarkerResolutionGenerator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/problems/MavenDependencyMarkerResolutionGenerator.java 2011-11-25 13:21:37 UTC (rev 36660)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/MavenDependencyMarkerResolutionGenerator.java 2011-11-26 13:08:52 UTC (rev 36676)
@@ -8,20 +8,32 @@
* Contributors:
* JBoss by Red Hat - Initial implementation.
************************************************************************************/
-package org.jboss.tools.maven.ui.internal.problems;
+package org.jboss.tools.maven.ui.internal.markers;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
+import org.jboss.tools.maven.ui.Messages;
@SuppressWarnings("nls")
public class MavenDependencyMarkerResolutionGenerator implements
IMarkerResolutionGenerator2 {
- private static final String MSG_PREFIX = "Missing artifact "; //$NON-NLS-1$
+ private static final String ORG_JBOSS_PREFIX = "org.jboss";
+ private static final String REDHAT_SUFFIX = "-redhat";
+
+ private static final String JBOSS_ENTERPRISE_REPO_SETUP_GUIDE_URL = "http://community.jboss.org/wiki/SettingUpTheJBossEnterpriseRepositories";
+
+ private static final String JBOSS_COMMUNITY_REPO_SETUP_GUIDE_URL = "http://community.jboss.org/wiki/MavenGettingStarted-Users";
+
+ private static final String MISSING_ARTIFACT_PREFIX = "Missing artifact "; //$NON-NLS-1$
+
+ private static final String FAILURE_TO_FIND_STRING = "Failure to find "; //$NON-NLS-1$
+
enum ResolutionType {
JBOSS_REPO, EAP_REPO, UNSUPPORTED
}
@@ -35,21 +47,14 @@
switch (type) {
case JBOSS_REPO:
return new IMarkerResolution[] {
- new JBossRepositoriesMarkerResolution(),
- new JBossRepositoriesMarkerResolution() {
- @Override
- public String getLabel() {
- return "Add JBoss repositories to pom.xml";
- }
- } };
+ new OpenPageInBrowserMarkerResolution(Messages.Quickfix_setupCommunityRepo,
+ JBOSS_COMMUNITY_REPO_SETUP_GUIDE_URL)
+ };
case EAP_REPO:
return new IMarkerResolution[] {
- new JBossRepositoriesMarkerResolution() {
- @Override
- public String getLabel() {
- return "Set up EAP repository";
- }
- } };
+ new OpenPageInBrowserMarkerResolution(Messages.Quickfix_setupEnterpriseRepo,
+ JBOSS_ENTERPRISE_REPO_SETUP_GUIDE_URL)
+ };
}
return new IMarkerResolution[0];
}
@@ -60,9 +65,9 @@
private ResolutionType getResolutionType(IMarker marker) {
ArtifactKey key = getArtifactKey(marker);
- if (key.getVersion().contains("-redhat")) {
+ if (key.getVersion().contains(REDHAT_SUFFIX)) {
return ResolutionType.EAP_REPO;
- } else if (key.getGroupId().startsWith("org.jboss")) {
+ } else if (key.getGroupId().startsWith(ORG_JBOSS_PREFIX)) {
return ResolutionType.JBOSS_REPO;
}
return ResolutionType.UNSUPPORTED;
@@ -74,7 +79,14 @@
key = (ArtifactKey) marker.getAttribute("artifactKey");
if (key == null) {
String message = (String) marker.getAttribute("message", null);
- key = parseMessage(message);
+ if (message != null) {
+ String markerType = marker.getType();
+ if (IMavenConstants.MARKER_DEPENDENCY_ID.equals(markerType)) {
+ key = parseDependencyErrorMessage(message);
+ } else if (IMavenConstants.MARKER_POM_LOADING_ID.equals(markerType)) {
+ key = parsePomLoadingErrorMessage(message);
+ }
+ }
}
} catch (CoreException e) {
e.printStackTrace();
@@ -82,24 +94,40 @@
return key;
}
- private ArtifactKey parseMessage(String message) {
+ private ArtifactKey parseDependencyErrorMessage(String message) {
ArtifactKey key = null;
- if (message != null && message.startsWith(MSG_PREFIX)) {
- String keyString = message.substring(MSG_PREFIX.length());
- String[] keyAsArray = keyString.trim().split(":"); //$NON-NLS-1$
- if (keyAsArray.length > 3) {
- String artifactId = keyAsArray[0];
- String groupId = keyAsArray[1];
- String classifier = null;
- String version;
- if (keyAsArray.length > 4) {
- classifier = keyAsArray[3];
- version = keyAsArray[4];
- } else {
- version = keyAsArray[3];
- }
- key = new ArtifactKey(groupId, artifactId, version, classifier);
+ if (message.startsWith(MISSING_ARTIFACT_PREFIX)) {
+ String keyString = message.substring(MISSING_ARTIFACT_PREFIX.length());
+ key = extractKey(key, keyString);
+ }
+ return key;
+ }
+
+ private ArtifactKey parsePomLoadingErrorMessage(String message) {
+ ArtifactKey key = null;
+ int start = message.indexOf(FAILURE_TO_FIND_STRING);
+ if (start > -1) {
+ int from = FAILURE_TO_FIND_STRING.length()+start;
+ String keyString = message.substring(from, message.indexOf(" ", from));
+ key = extractKey(key, keyString);
+ }
+ return key;
+ }
+
+ private ArtifactKey extractKey(ArtifactKey key, String keyString) {
+ String[] keyAsArray = keyString.trim().split(":"); //$NON-NLS-1$
+ if (keyAsArray.length > 3) {
+ String groupId = keyAsArray[0];
+ String artifactId = keyAsArray[1];
+ String classifier = null;
+ String version;
+ if (keyAsArray.length > 4) {
+ classifier = keyAsArray[3];
+ version = keyAsArray[4];
+ } else {
+ version = keyAsArray[3];
}
+ key = new ArtifactKey(groupId, artifactId, version, classifier);
}
return key;
}
Copied: trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/OpenPageInBrowserMarkerResolution.java (from rev 36660, trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/problems/JBossRepositoriesMarkerResolution.java)
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/OpenPageInBrowserMarkerResolution.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/markers/OpenPageInBrowserMarkerResolution.java 2011-11-26 13:08:52 UTC (rev 36676)
@@ -0,0 +1,69 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.maven.ui.internal.markers;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.IMarkerResolution2;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+public class OpenPageInBrowserMarkerResolution implements IMarkerResolution,
+ IMarkerResolution2 {
+
+
+ private final String label;
+ private final String url;
+
+ public OpenPageInBrowserMarkerResolution(String label, String url) {
+ this.label = label;
+ this.url = url;
+ }
+
+ public String getDescription() {
+ return getLabel();
+ }
+
+ public Image getImage() {
+ return null;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void run(IMarker arg0) {
+
+ IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
+ try {
+ IWebBrowser browser;
+ if (browserSupport.isInternalWebBrowserAvailable()) {
+ browser = browserSupport.createBrowser(null);
+ } else {
+ browser = browserSupport.getExternalBrowser();
+ }
+ browser.openURL(new URL(url));
+ } catch (PartInitException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (MalformedURLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/messages.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/messages.properties 2011-11-25 19:55:09 UTC (rev 36675)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/messages.properties 2011-11-26 13:08:52 UTC (rev 36676)
@@ -64,3 +64,6 @@
SelectProfilesDialog_Select_Maven_profiles=Select Maven profiles
SelectProfilesDialog_Select_the_active_Maven_profiles=Select the active Maven profiles for project {0}. Right-click to (de)activate a profile.
SelectProfilesDialog_SelectAll=Select All
+
+Quickfix_setupCommunityRepo=See how to setup JBoss repositories in your settings.xml
+Quickfix_setupEnterpriseRepo=See how to setup JBoss Enterprise repositories in your settings.xml
\ No newline at end of file
13 years, 1 month
JBoss Tools SVN: r36675 - in workspace/yradtsevich/browsersim/swt-webkit-browsersim: org.jboss.tools.vpe.browsersim/META-INF and 30 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-11-25 14:55:09 -0500 (Fri, 25 Nov 2011)
New Revision: 36675
Added:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/AbstractWebKitBrowser.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/BrowserSimFactory.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/editors/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/handlers/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/icons/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/
Removed:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/browsersim/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/browsersim/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/browsersim/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/
Modified:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/.project
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/META-INF/MANIFEST.MF
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/BrowserAllTests.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/.project
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/META-INF/MANIFEST.MF
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_gtk_linux_x86.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_gtk_linux_x86_64.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_webkit_cocoa_macos.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_win32_win32_x86.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/.project
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/editors/BrowserSimEditorLauncher.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/handlers/RunBrowserSimHandler.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/.project
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/META-INF/MANIFEST.MF
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/Device.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListHolder.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/EditDeviceDialog.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/NLS.java
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ResourcesUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-9539 : Browsersim app for testing mobile/desktop web apps
- renaming packages to org.jboss.tools.vpe.browsersim*
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/.project
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/.project 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/.project 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.browsersim</name>
+ <name>org.jboss.tools.vpe.browsersim</name>
<comment></comment>
<projects>
</projects>
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/META-INF/MANIFEST.MF
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/META-INF/MANIFEST.MF 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/META-INF/MANIFEST.MF 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: BrowserSim
-Bundle-SymbolicName: org.jboss.tools.browsersim;singleton:=true
+Bundle-SymbolicName: org.jboss.tools.vpe.browsersim;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.swt;bundle-version="3.7.0",
- org.jboss.tools.browsersim.browser;bundle-version="1.0.0"
-Export-Package: org.jboss.tools.browsersim.ui
+ org.jboss.tools.vpe.browsersim.browser;bundle-version="1.0.0"
+Export-Package: org.jboss.tools.vpe.browsersim.ui
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/Device.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/model/Device.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/Device.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.model;
+package org.jboss.tools.vpe.browsersim.model;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/model/DevicesList.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.model;
+package org.jboss.tools.vpe.browsersim.model;
import java.util.List;
import java.util.Observable;
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListHolder.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/model/DevicesListHolder.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListHolder.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.model;
+package org.jboss.tools.vpe.browsersim.model;
import java.util.Observable;
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/model/DevicesListStorage.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.model;
+package org.jboss.tools.vpe.browsersim.model;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -23,15 +23,15 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.jboss.tools.browsersim.util.ResourcesUtil;
+import org.jboss.tools.vpe.browsersim.util.ResourcesUtil;
/**
* @author Yahor Radtsevich (yradtsevich)
*/
public class DevicesListStorage {
- private static final String DEFAULT_PREFERENCES_RESOURCE = "/org/jboss/tools/browsersim/resources/config/devices.cfg";
- private static final String USER_PREFERENCES_FOLDER = "org.jboss.tools.browsersim";
+ private static final String DEFAULT_PREFERENCES_RESOURCE = "/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg";
+ private static final String USER_PREFERENCES_FOLDER = "org.jboss.tools.vpe.browsersim";
private static final String USER_PREFERENCES_FILE = "devices.cfg";
public static void saveUserDefinedDevicesList(DevicesList devicesList) {
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/ui/BrowserSim.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.ui;
+package org.jboss.tools.vpe.browsersim.ui;
import java.net.URI;
import java.net.URISyntaxException;
@@ -44,13 +44,13 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
-import org.jboss.tools.browsersim.browser.AbstractWebKitBrowser;
-import org.jboss.tools.browsersim.browser.WebKitBrowserFactory;
-import org.jboss.tools.browsersim.model.Device;
-import org.jboss.tools.browsersim.model.DevicesList;
-import org.jboss.tools.browsersim.model.DevicesListHolder;
-import org.jboss.tools.browsersim.model.DevicesListStorage;
-import org.jboss.tools.browsersim.util.ResourcesUtil;
+import org.jboss.tools.vpe.browsersim.browser.AbstractWebKitBrowser;
+import org.jboss.tools.vpe.browsersim.browser.WebKitBrowserFactory;
+import org.jboss.tools.vpe.browsersim.model.Device;
+import org.jboss.tools.vpe.browsersim.model.DevicesList;
+import org.jboss.tools.vpe.browsersim.model.DevicesListHolder;
+import org.jboss.tools.vpe.browsersim.model.DevicesListStorage;
+import org.jboss.tools.vpe.browsersim.util.ResourcesUtil;
/**
* @author Yahor Radtsevich (yradtsevich)
@@ -247,11 +247,11 @@
}
});
- final Image imageBack = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/browsersim/resources/icons/nav_backward.gif")); //$NON-NLS-1$
- final Image imageForward = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/browsersim/resources/icons/nav_forward.gif")); //$NON-NLS-1$
- final Image imageStop = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/browsersim/resources/icons/nav_stop.gif")); //$NON-NLS-1$
- final Image imageRefresh = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/browsersim/resources/icons/nav_refresh.gif")); //$NON-NLS-1$
- final Image imageGo = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/browsersim/resources/icons/nav_go.gif")); //$NON-NLS-1$
+ final Image imageBack = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_backward.gif")); //$NON-NLS-1$
+ final Image imageForward = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_forward.gif")); //$NON-NLS-1$
+ final Image imageStop = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_stop.gif")); //$NON-NLS-1$
+ final Image imageRefresh = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_refresh.gif")); //$NON-NLS-1$
+ final Image imageGo = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_go.gif")); //$NON-NLS-1$
itemBack.setImage(imageBack);
itemForward.setImage(imageForward);
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/EditDeviceDialog.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/ui/EditDeviceDialog.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/EditDeviceDialog.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,4 +1,4 @@
-package org.jboss.tools.browsersim.ui;
+package org.jboss.tools.vpe.browsersim.ui;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
@@ -17,7 +17,7 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.browsersim.model.Device;
+import org.jboss.tools.vpe.browsersim.model.Device;
public class EditDeviceDialog extends Dialog {
protected Device resultDevice;
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/ui/ManageDevicesDialog.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.ui;
+package org.jboss.tools.vpe.browsersim.ui;
import java.util.ArrayList;
import java.util.List;
@@ -27,9 +27,9 @@
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
-import org.jboss.tools.browsersim.model.Device;
-import org.jboss.tools.browsersim.model.DevicesList;
-import org.jboss.tools.browsersim.model.DevicesListStorage;
+import org.jboss.tools.vpe.browsersim.model.Device;
+import org.jboss.tools.vpe.browsersim.model.DevicesList;
+import org.jboss.tools.vpe.browsersim.model.DevicesListStorage;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/ui/Messages.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,9 +8,9 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.ui;
+package org.jboss.tools.vpe.browsersim.ui;
-import org.jboss.tools.browsersim.util.NLS;
+import org.jboss.tools.vpe.browsersim.util.NLS;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/NLS.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/util/NLS.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/NLS.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.util;
+package org.jboss.tools.vpe.browsersim.util;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ResourcesUtil.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/browsersim/util/ResourcesUtil.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ResourcesUtil.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,11 +8,11 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.util;
+package org.jboss.tools.vpe.browsersim.util;
import java.io.InputStream;
-import org.jboss.tools.browsersim.ui.BrowserSim;
+import org.jboss.tools.vpe.browsersim.ui.BrowserSim;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/.project
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/.project 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/.project 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.browsersim.browser</name>
+ <name>org.jboss.tools.vpe.browsersim.browser</name>
<comment></comment>
<projects>
</projects>
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/META-INF/MANIFEST.MF
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/META-INF/MANIFEST.MF 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/META-INF/MANIFEST.MF 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: WebKit
-Bundle-SymbolicName: org.jboss.tools.browsersim.browser;singleton:=true
+Bundle-SymbolicName: org.jboss.tools.vpe.browsersim.browser;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-ExtensibleAPI: true
-Export-Package: org.jboss.tools.browsersim.browser
+Export-Package: org.jboss.tools.vpe.browsersim.browser
Require-Bundle: org.eclipse.swt;bundle-version="3.7.0"
Copied: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/AbstractWebKitBrowser.java (from rev 36673, workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/browsersim/browser/AbstractWebKitBrowser.java)
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/AbstractWebKitBrowser.java (rev 0)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/AbstractWebKitBrowser.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.browsersim.browser;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Yahor Radtsevich (yradtsevich)
+ */
+public abstract class AbstractWebKitBrowser extends Browser {
+
+ private String defaultUserAgent;
+
+ public AbstractWebKitBrowser(Composite parent, int style) {
+ super(parent, style | SWT.WEBKIT);
+ }
+
+ @Override
+ protected void checkSubclass() {
+ }
+
+ @Override
+ public boolean setUrl(String url, String postData, String[] headers) {
+ setCustomUserAgent(defaultUserAgent);
+ boolean result = super.setUrl(url, postData, headers);
+ setCustomUserAgent(defaultUserAgent);
+ return result;
+ }
+
+ public void setDefaultUserAgent(String defaultUserAgent) {
+ this.defaultUserAgent = defaultUserAgent;
+ setCustomUserAgent(defaultUserAgent);
+ }
+
+ protected abstract void setCustomUserAgent(String userAgent);
+}
Copied: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java (from rev 36673, workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/browsersim/browser/PlatformUtil.java)
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java (rev 0)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.browsersim.browser;
+
+import org.eclipse.swt.SWT;
+
+/**
+ * @author "Yahor Radtsevich (yradtsevich)"
+ */
+public class PlatformUtil {
+
+ public static final String CURRENT_PLATFORM;
+ static {
+ String os = getOs();
+ String ws = getWs();
+ String arch = getArch();
+
+ CURRENT_PLATFORM = ws + '.' + os + ("macosx".equals(os) ? "" : '.' + arch);
+ }
+
+
+ /*
+ * Copy of org.eclipse.swt.internal.Library.arch()
+ */
+ private static String getArch() {
+ String osArch = System.getProperty("os.arch"); //$NON-NLS-1$
+ if (osArch.equals ("i386") || osArch.equals ("i686")) return "x86"; //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
+ if (osArch.equals ("amd64")) return "x86_64"; //$NON-NLS-1$ $NON-NLS-2$
+ if (osArch.equals ("IA64N")) return "ia64_32"; //$NON-NLS-1$ $NON-NLS-2$
+ if (osArch.equals ("IA64W")) return "ia64"; //$NON-NLS-1$ $NON-NLS-2$
+ return osArch;
+ }
+
+ /*
+ * Copy of org.eclipse.swt.internal.Library.os()
+ */
+ private static String getOs() {
+ String osName = System.getProperty("os.name"); //$NON-NLS-1$
+ if (osName.equals ("Linux")) return "linux"; //$NON-NLS-1$ $NON-NLS-2$
+ if (osName.equals ("AIX")) return "aix"; //$NON-NLS-1$ $NON-NLS-2$
+ if (osName.equals ("Solaris") || osName.equals ("SunOS")) return "solaris"; //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
+ if (osName.equals ("HP-UX")) return "hpux"; //$NON-NLS-1$ $NON-NLS-2$
+ if (osName.equals ("Mac OS X")) return "macosx"; //$NON-NLS-1$ $NON-NLS-2$
+ if (osName.startsWith ("Win")) return "win32"; //$NON-NLS-1$ $NON-NLS-2$
+ return osName;
+ }
+
+ private static String getWs() {
+ return SWT.getPlatform();
+ }
+}
Copied: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java (from rev 36673, workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/browsersim/browser/WebKitBrowserFactory.java)
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java (rev 0)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.browsersim.browser;
+
+import org.eclipse.swt.SWTError;
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.vpe.browsersim.browser.internal.WebKitBrowser_gtk_linux_x86;
+import org.jboss.tools.vpe.browsersim.browser.internal.WebKitBrowser_gtk_linux_x86_64;
+import org.jboss.tools.vpe.browsersim.browser.internal.WebKitBrowser_webkit_cocoa_macos;
+import org.jboss.tools.vpe.browsersim.browser.internal.WebKitBrowser_win32_win32_x86;
+
+/**
+ * @author "Yahor Radtsevich (yradtsevich)"
+ */
+public class WebKitBrowserFactory {
+ public static AbstractWebKitBrowser createWebKitBrowser(Composite parent, int style) {
+ if (PlatformUtil.CURRENT_PLATFORM.equals("gtk.linux.x86")) {
+ return new WebKitBrowser_gtk_linux_x86(parent, style);
+ } else if (PlatformUtil.CURRENT_PLATFORM.equals("gtk.linux.x86_64")) {
+ return new WebKitBrowser_gtk_linux_x86_64(parent, style);
+ } else if (PlatformUtil.CURRENT_PLATFORM.equals("cocoa.macosx")) {
+ return new WebKitBrowser_webkit_cocoa_macos(parent, style);
+ } else if (PlatformUtil.CURRENT_PLATFORM.equals("win32.win32.x86")) {
+ return new WebKitBrowser_win32_win32_x86(parent, style);
+ }
+
+ throw new SWTError("Unsupported Platform");
+ }
+}
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_gtk_linux_x86.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/browsersim/browser/internal/WebKitBrowser_gtk_linux_x86.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_gtk_linux_x86.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.browser.internal;
+package org.jboss.tools.vpe.browsersim.browser.internal;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -16,7 +16,7 @@
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
-import org.jboss.tools.browsersim.browser.AbstractWebKitBrowser;
+import org.jboss.tools.vpe.browsersim.browser.AbstractWebKitBrowser;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_gtk_linux_x86_64.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/browsersim/browser/internal/WebKitBrowser_gtk_linux_x86_64.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_gtk_linux_x86_64.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.browser.internal;
+package org.jboss.tools.vpe.browsersim.browser.internal;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -16,7 +16,7 @@
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
-import org.jboss.tools.browsersim.browser.AbstractWebKitBrowser;
+import org.jboss.tools.vpe.browsersim.browser.AbstractWebKitBrowser;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_webkit_cocoa_macos.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/browsersim/browser/internal/WebKitBrowser_webkit_cocoa_macos.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_webkit_cocoa_macos.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.browser.internal;
+package org.jboss.tools.vpe.browsersim.browser.internal;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -16,7 +16,7 @@
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
-import org.jboss.tools.browsersim.browser.AbstractWebKitBrowser;
+import org.jboss.tools.vpe.browsersim.browser.AbstractWebKitBrowser;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_win32_win32_x86.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/browsersim/browser/internal/WebKitBrowser_win32_win32_x86.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/internal/WebKitBrowser_win32_win32_x86.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.browser.internal;
+package org.jboss.tools.vpe.browsersim.browser.internal;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -16,7 +16,7 @@
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
-import org.jboss.tools.browsersim.browser.AbstractWebKitBrowser;
+import org.jboss.tools.vpe.browsersim.browser.AbstractWebKitBrowser;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/.project
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/.project 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/.project 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.browsersim.browser.test</name>
+ <name>org.jboss.tools.vpe.browsersim.browser.test</name>
<comment></comment>
<projects>
</projects>
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/META-INF/MANIFEST.MF
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/META-INF/MANIFEST.MF 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/META-INF/MANIFEST.MF 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: BrowserSim WebKit Test
-Bundle-SymbolicName: org.jboss.tools.browsersim.browser.test
+Bundle-SymbolicName: org.jboss.tools.vpe.browsersim.browser.test
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit,
org.eclipse.swt,
- org.jboss.tools.browsersim.browser;bundle-version="1.0.0"
+ org.jboss.tools.vpe.browsersim.browser;bundle-version="1.0.0"
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/BrowserAllTests.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/browsersim/browser/test/BrowserAllTests.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/BrowserAllTests.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,4 +1,4 @@
-package org.jboss.tools.browsersim.browser.test;
+package org.jboss.tools.vpe.browsersim.browser.test;
import junit.framework.Test;
import junit.framework.TestSuite;
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/browsersim/browser/test/WebKitTests.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.browser.test;
+package org.jboss.tools.vpe.browsersim.browser.test;
import junit.framework.TestCase;
@@ -18,8 +18,8 @@
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.jboss.tools.browsersim.browser.AbstractWebKitBrowser;
-import org.jboss.tools.browsersim.browser.WebKitBrowserFactory;
+import org.jboss.tools.vpe.browsersim.browser.AbstractWebKitBrowser;
+import org.jboss.tools.vpe.browsersim.browser.WebKitBrowserFactory;
/**
* @author Yahor Radtsevich (yradtsevich)
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/.project
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/.project 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/.project 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.browsersim.eclipse</name>
+ <name>org.jboss.tools.vpe.browsersim.eclipse</name>
<comment></comment>
<projects>
</projects>
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF 2011-11-25 19:55:09 UTC (rev 36675)
@@ -1,12 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: BrowserSim Eclipse Plug-in
-Bundle-SymbolicName: org.jboss.tools.browsersim.eclipse; singleton:=true
+Bundle-SymbolicName: org.jboss.tools.vpe.browsersim.eclipse;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.jboss.tools.browsersim.eclipse.Activator
+Bundle-Activator: org.jboss.tools.vpe.browsersim.eclipse.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.jboss.tools.browsersim.browser;bundle-version="1.0.0",
+ org.jboss.tools.vpe.browsersim.browser;bundle-version="1.0.0",
org.eclipse.core.resources,
org.eclipse.jface.text,
org.eclipse.ui.editors,
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml 2011-11-25 19:11:50 UTC (rev 36674)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml 2011-11-25 19:55:09 UTC (rev 36675)
@@ -5,25 +5,25 @@
point="org.eclipse.ui.commands">
<category
name="BrowserSim"
- id="org.jboss.tools.browsersim.eclipse.commands.category">
+ id="org.jboss.tools.vpe.browsersim.eclipse.commands.category">
</category>
<command
name="Run BrowserSim"
- categoryId="org.jboss.tools.browsersim.eclipse.commands.category"
- id="org.jboss.tools.browsersim.eclipse.commands.runBrowserSim">
+ categoryId="org.jboss.tools.vpe.browsersim.eclipse.commands.category"
+ id="org.jboss.tools.vpe.browsersim.eclipse.commands.runBrowserSim">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
- commandId="org.jboss.tools.browsersim.eclipse.commands.runBrowserSim"
- class="org.jboss.tools.browsersim.eclipse.handlers.RunBrowserSimHandler">
+ commandId="org.jboss.tools.vpe.browsersim.eclipse.commands.runBrowserSim"
+ class="org.jboss.tools.vpe.browsersim.eclipse.handlers.RunBrowserSimHandler">
</handler>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
- commandId="org.jboss.tools.browsersim.eclipse.commands.runBrowserSim"
+ commandId="org.jboss.tools.vpe.browsersim.eclipse.commands.runBrowserSim"
contextId="org.eclipse.ui.contexts.window"
sequence="M1+6"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
@@ -34,12 +34,12 @@
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar
- id="org.jboss.tools.browsersim.eclipse.toolbars.sampleToolbar">
+ id="org.jboss.tools.vpe.browsersim.eclipse.toolbars.sampleToolbar">
<command
- commandId="org.jboss.tools.browsersim.eclipse.commands.runBrowserSim"
+ commandId="org.jboss.tools.vpe.browsersim.eclipse.commands.runBrowserSim"
icon="icons/sample.gif"
tooltip="Run BrowserSim"
- id="org.jboss.tools.browsersim.eclipse.toolbars.runBrowserSim">
+ id="org.jboss.tools.vpe.browsersim.eclipse.toolbars.runBrowserSim">
</command>
</toolbar>
</menuContribution>
@@ -49,16 +49,16 @@
<editor
extensions="html"
icon="icons/sample.gif"
- id="org.jboss.tools.browsersim.eclipse.editors.BrowserSimLauncher"
- launcher="org.jboss.tools.browsersim.eclipse.editors.BrowserSimEditorLauncher"
+ id="org.jboss.tools.vpe.browsersim.eclipse.editors.BrowserSimLauncher"
+ launcher="org.jboss.tools.vpe.browsersim.eclipse.editors.BrowserSimEditorLauncher"
name="BrowserSim">
</editor>
</extension>
<extension point="org.eclipse.ui.browser.browsers">
<browser
executable=""
- factoryclass="org.jboss.tools.browsersim.eclipse.BrowserSimFactory"
- id="org.jboss.tools.browsersim.eclipse"
+ factoryclass="org.jboss.tools.vpe.browsersim.eclipse.BrowserSimFactory"
+ id="org.jboss.tools.vpe.browsersim.eclipse"
name="BrowserSim"
os="Win32,linux,MacOSX">
<location>
Copied: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java (from rev 36673, workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/Activator.java)
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java (rev 0)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.browsersim.eclipse;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @author "Yahor Radtsevich (yradtsevich)"
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.vpe.browsersim.eclipse"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+}
Copied: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/BrowserSimFactory.java (from rev 36673, workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/BrowserSimFactory.java)
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/BrowserSimFactory.java (rev 0)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/BrowserSimFactory.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.browsersim.eclipse;
+
+import java.net.URL;
+
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.browser.BrowserFactory;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.jboss.tools.vpe.browsersim.eclipse.util.BrowserSimLauncher;
+
+/**
+ * Contribution to the {@code org.eclipse.ui.editors} extension point
+ *
+ * @author "Yahor Radtsevich (yradtsevich)"
+ */
+public class BrowserSimFactory extends BrowserFactory {
+ @Override
+ public IWebBrowser createBrowser(final String id, String location,
+ String parameters) {
+ return new IWebBrowser() {
+ @Override
+ public void openURL(URL url) throws PartInitException {
+ BrowserSimLauncher.launchBrowserSim(url.toString());
+ }
+ @Override
+ public String getId() {
+ return id;
+ }
+ @Override
+ public boolean close() {
+ return false;
+ }
+ };
+ }
+
+}
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/editors/BrowserSimEditorLauncher.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/editors/BrowserSimEditorLauncher.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/editors/BrowserSimEditorLauncher.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -9,11 +9,11 @@
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.eclipse.editors;
+package org.jboss.tools.vpe.browsersim.eclipse.editors;
import org.eclipse.core.runtime.IPath;
import org.eclipse.ui.IEditorLauncher;
-import org.jboss.tools.browsersim.eclipse.util.BrowserSimLauncher;
+import org.jboss.tools.vpe.browsersim.eclipse.util.BrowserSimLauncher;
/**
* @author "Yahor Radtsevich (yradtsevich)"
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/handlers/RunBrowserSimHandler.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/handlers/RunBrowserSimHandler.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/handlers/RunBrowserSimHandler.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,12 +8,12 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.eclipse.handlers;
+package org.jboss.tools.vpe.browsersim.eclipse.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
-import org.jboss.tools.browsersim.eclipse.util.BrowserSimLauncher;
+import org.jboss.tools.vpe.browsersim.eclipse.util.BrowserSimLauncher;
/**
* @author "Yahor Radtsevich (yradtsevich)"
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/browsersim/eclipse/util/BrowserSimLauncher.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2011-11-25 19:55:09 UTC (rev 36675)
@@ -8,7 +8,7 @@
* Contributor:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.browsersim.eclipse.util;
+package org.jboss.tools.vpe.browsersim.eclipse.util;
import java.io.IOException;
import java.io.InputStream;
@@ -17,7 +17,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
-import org.jboss.tools.browsersim.browser.PlatformUtil;
+import org.jboss.tools.vpe.browsersim.browser.PlatformUtil;
/**
* @author "Yahor Radtsevich (yradtsevich)"
@@ -26,8 +26,8 @@
public static void launchBrowserSim(String initialUrl) {
String pathSeparator = System.getProperty("path.separator");
- String classPath = getBundleLocation("org.jboss.tools.browsersim") + "bin/"
- + pathSeparator + getBundleLocation("org.jboss.tools.browsersim.browser") + "bin/"
+ String classPath = getBundleLocation("org.jboss.tools.vpe.browsersim") + "bin/"
+ + pathSeparator + getBundleLocation("org.jboss.tools.vpe.browsersim.browser") + "bin/"
+ pathSeparator + getBundleLocation("org.eclipse.swt")
+ pathSeparator + getBundleLocation("org.eclipse.swt." + PlatformUtil.CURRENT_PLATFORM);
String javaCommand = System.getProperty("java.home") + "/bin/java";
@@ -43,7 +43,7 @@
commandElements.add("-cp");
commandElements.add(classPath);
- commandElements.add("org.jboss.tools.browsersim.ui.BrowserSim");
+ commandElements.add("org.jboss.tools.vpe.browsersim.ui.BrowserSim");
if (initialUrl != null) {
commandElements.add(initialUrl);
}
13 years, 1 month
JBoss Tools SVN: r36674 - trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-11-25 14:11:50 -0500 (Fri, 25 Nov 2011)
New Revision: 36674
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java
Log:
[JBIDE-10224] removed bundle activators, removed "lazy bundle activation", replaced bundle dependency by package dependency, commented hack
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java 2011-11-25 19:09:48 UTC (rev 36673)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java 2011-11-25 19:11:50 UTC (rev 36674)
@@ -15,7 +15,6 @@
import java.net.UnknownHostException;
import org.jboss.ide.eclipse.as.core.server.v7.management.IJBoss7ManagerService;
-import org.jboss.ide.eclipse.as.internal.management.as7.AS7ManagementActivator;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -31,6 +30,7 @@
public class JBossManagementServiceTest {
private static final String DS_BUNDLEID = "org.eclipse.equinox.ds";
+ private static final String AS7MANAGER_PLUGINID = "org.jboss.ide.eclipse.as.management.as7";
@Before
public void setUp() throws UnknownHostException {
@@ -55,8 +55,8 @@
private void ensureServiceBundleIsRunning() throws BundleException {
BundleContext context = Activator.getContext();
assertNotNull("bundle of this test is not active", context);
- Bundle bundle = getBundle(AS7ManagementActivator.PLUGIN_ID);
- assertNotNull(AS7ManagementActivator.PLUGIN_ID + " not installed", bundle);
+ Bundle bundle = getBundle(AS7MANAGER_PLUGINID);
+ assertNotNull(AS7MANAGER_PLUGINID + " not installed", bundle);
startBundle(bundle);
}
13 years, 1 month
JBoss Tools SVN: r36673 - workspace/yradtsevich/browsersim/swt-webkit-browsersim.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-11-25 14:09:48 -0500 (Fri, 25 Nov 2011)
New Revision: 36673
Added:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser.test/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.browser/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim.eclipse/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.vpe.browsersim/
Removed:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.browser.test/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.browser/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim.eclipse/
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/
Log:
https://issues.jboss.org/browse/JBIDE-9539 : Browsersim app for testing mobile/desktop web apps
- renaming packages to org.jboss.tools.vpe.browsersim*
13 years, 1 month
JBoss Tools SVN: r36672 - trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-11-25 12:35:44 -0500 (Fri, 25 Nov 2011)
New Revision: 36672
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF
Log:
JBIDE-10090 NPE in VPE
Dependencies are fixed for org.jboss.tools.jst.web.kb.test
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF 2011-11-25 16:31:58 UTC (rev 36671)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF 2011-11-25 17:35:44 UTC (rev 36672)
@@ -20,7 +20,8 @@
org.eclipse.jdt.ui;bundle-version="3.7.0",
org.eclipse.search;bundle-version="3.7.0",
org.jboss.tools.common.validation,
- org.jboss.tools.common.base.test
+ org.jboss.tools.common.base.test,
+ org.eclipse.jface.text;bundle-version="3.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %Bundle-Vendor.0
13 years, 1 month