JBoss Tools SVN: r36366 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-16 09:10:01 -0500 (Wed, 16 Nov 2011)
New Revision: 36366
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-10054 Support Readme/description at Group level for Project Examples
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-16 13:35:54 UTC (rev 36365)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-16 14:10:01 UTC (rev 36366)
@@ -725,10 +725,6 @@
RefreshTutorialsJob.INSTANCE.removeJobChangeListener(refreshTutorialsJobChangeListener);
refreshTutorialsJobChangeListener = null;
}
- if (categoryFont != null) {
- categoryFont.dispose();
- categoryFont = null;
- }
super.dispose();
}
13 years, 1 month
JBoss Tools SVN: r36365 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-16 08:35:54 -0500 (Wed, 16 Nov 2011)
New Revision: 36365
Modified:
trunk/build/parent/pom.xml
Log:
Beta1 is now M5
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2011-11-16 13:34:30 UTC (rev 36364)
+++ trunk/build/parent/pom.xml 2011-11-16 13:35:54 UTC (rev 36365)
@@ -18,7 +18,7 @@
<scmBranch>trunk</scmBranch>
<JBT_VERSION>3.3.0</JBT_VERSION>
<JBDS_VERSION>5.0.0</JBDS_VERSION>
- <BUILD_ALIAS>Beta1</BUILD_ALIAS>
+ <BUILD_ALIAS>M5</BUILD_ALIAS>
<memoryOptions1>-Xms512m -Xmx1024m -XX:PermSize=256m</memoryOptions1>
<memoryOptions2>-XX:MaxPermSize=256m</memoryOptions2>
<systemProperties></systemProperties>
13 years, 1 month
JBoss Tools SVN: r36364 - in trunk/central/plugins/org.jboss.tools.central: schema and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-16 08:34:30 -0500 (Wed, 16 Nov 2011)
New Revision: 36364
Modified:
trunk/central/plugins/org.jboss.tools.central/plugin.xml
trunk/central/plugins/org.jboss.tools.central/schema/tutorials.exsd
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/DescriptionToolTip.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/TutorialCategory.java
Log:
JBIDE-10054 Support Readme/description at Group level for Project Examples
Modified: trunk/central/plugins/org.jboss.tools.central/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-11-16 10:46:04 UTC (rev 36363)
+++ trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-11-16 13:34:30 UTC (rev 36364)
@@ -208,10 +208,12 @@
<category
id="org.jboss.tools.central.jbossas.quickstart"
name="JBoss AS 7 Quickstarts"
+ description="These quickstarts are aimed to get you up to writing applications with minimal fuss. We recommend that you work through the quickstarts in the order they are presented in this guide, however if you have previous experience with Java EE 6, you may wish to skip some or all of the quickstarts."
priority="2" />
<category
id="org.jboss.tools.central.seam2"
name="Seam 2 Tutorials"
+ description="These tutorials are intended to help you develop Seam 2 applications."
priority="5" />
<tutorial
id="org.jboss.tools.central.jbossas.quickstart.helloworld"
Modified: trunk/central/plugins/org.jboss.tools.central/schema/tutorials.exsd
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/schema/tutorials.exsd 2011-11-16 10:46:04 UTC (rev 36363)
+++ trunk/central/plugins/org.jboss.tools.central/schema/tutorials.exsd 2011-11-16 13:34:30 UTC (rev 36364)
@@ -145,6 +145,13 @@
</documentation>
</annotation>
</attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-11-16 10:46:04 UTC (rev 36363)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java 2011-11-16 13:34:30 UTC (rev 36364)
@@ -314,6 +314,7 @@
if (CATEGORY.equals(configurationElement.getName())) {
String name = configurationElement.getAttribute(NAME);
String id = configurationElement.getAttribute(ID);
+ String description = configurationElement.getAttribute(DESCRIPTION);
String priorityString = configurationElement.getAttribute(PRIORITY);
int priority = Integer.MAX_VALUE;
if (priorityString != null) {
@@ -324,7 +325,7 @@
log(e);
}
}
- TutorialCategory category = new TutorialCategory(id, name, priority);
+ TutorialCategory category = new TutorialCategory(id, name, priority, description);
tutorialCategories.put(id, category);
}
}
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/DescriptionToolTip.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/DescriptionToolTip.java 2011-11-16 10:46:04 UTC (rev 36363)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/DescriptionToolTip.java 2011-11-16 13:34:30 UTC (rev 36364)
@@ -10,8 +10,10 @@
************************************************************************************/
package org.jboss.tools.central.editors;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.window.ToolTip;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -46,11 +48,18 @@
layout.marginLeft = 2;
composite.setLayout(layout);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd.widthHint = 300;
composite.setLayoutData(gd);
composite.setBackground(parent.getDisplay().getSystemColor(
SWT.COLOR_INFO_BACKGROUND));
Text text = new Text(composite,
- SWT.READ_ONLY | SWT.WRAP);
+ SWT.READ_ONLY | SWT.MULTI | SWT.WRAP);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ GC gc = new GC(parent);
+ gd.heightHint = Dialog.convertHeightInCharsToPixels(gc
+ .getFontMetrics(), (description.length()/40) + 1);
+ gc.dispose();
+ text.setLayoutData(gd);
text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
text.setText(description);
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-16 10:46:04 UTC (rev 36363)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-16 13:34:30 UTC (rev 36364)
@@ -54,6 +54,7 @@
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
@@ -64,6 +65,9 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchWindow;
@@ -87,6 +91,7 @@
import org.eclipse.ui.forms.widgets.TableWrapData;
import org.eclipse.ui.forms.widgets.TableWrapLayout;
import org.eclipse.ui.ide.IDEActionFactory;
+import org.eclipse.ui.internal.forms.widgets.FormFonts;
import org.eclipse.ui.menus.CommandContributionItem;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -150,6 +155,7 @@
private Section settingsSection;
private Composite settingsComposite;
private Point oldSize;
+ private Font categoryFont;
public GettingStartedPage(FormEditor editor) {
super(editor, ID, "Getting Started");
@@ -719,6 +725,10 @@
RefreshTutorialsJob.INSTANCE.removeJobChangeListener(refreshTutorialsJobChangeListener);
refreshTutorialsJobChangeListener = null;
}
+ if (categoryFont != null) {
+ categoryFont.dispose();
+ categoryFont = null;
+ }
super.dispose();
}
@@ -839,10 +849,15 @@
if (expandedCategories.contains(category)) {
style|=ExpandableComposite.EXPANDED;
}
- final ExpandableComposite categoryComposite = toolkit.createExpandableComposite(tutorialsComposite,
+
+ final CategoryExpandableComposite categoryComposite = new CategoryExpandableComposite(tutorialsComposite, toolkit.getOrientation(),
style);
+
+ categoryComposite.setFont(getBoldFont(categoryComposite.getFont()));
+
categoryComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TB_TOGGLE));
categoryComposite.setText(category.getName());
+
GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
categoryComposite.setLayoutData(gd);
categoryComposite.setLayout(new GridLayout());
@@ -872,6 +887,11 @@
hookTooltip(tutorialText, tutorial);
}
categoryComposite.setClient(composite);
+ String description = category.getDescription();
+ if (description != null && !description.isEmpty() && categoryComposite.getControl() != null) {
+ final ToolTip toolTip = new DescriptionToolTip(categoryComposite.getControl(), description);
+ toolTip.activate();
+ }
}
tutorialPageBook.showPage(tutorialsComposite);
@@ -882,6 +902,18 @@
//recomputeScrollComposite(tutorialScrollComposite, tutorialPageBook);
}
+ private Font getBoldFont(Font font) {
+ if (categoryFont != null) {
+ return categoryFont;
+ }
+ if (font == null || toolkit == null || toolkit.getColors() == null) {
+ return null;
+ }
+ categoryFont = FormFonts.getInstance().getBoldFont(toolkit.getColors().getDisplay(),
+ font);
+ return categoryFont;
+ }
+
private void hookTooltip(FormText tutorialText, Tutorial tutorial) {
final String description = JBossCentralActivator.getDefault().getDescription(tutorial);
if (description != null && !description.isEmpty()) {
@@ -1241,5 +1273,20 @@
}
}
+
+ private class CategoryExpandableComposite extends ExpandableComposite {
+ public CategoryExpandableComposite(Composite parent, int style,
+ int expansionStyle) {
+ super(parent, style, expansionStyle);
+ setMenu(tutorialsComposite.getMenu());
+ toolkit.adapt(this, true, true);
+ }
+
+ public Control getControl() {
+ return textLabel;
+ }
+
+ }
+
}
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/TutorialCategory.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/TutorialCategory.java 2011-11-16 10:46:04 UTC (rev 36363)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/model/TutorialCategory.java 2011-11-16 13:34:30 UTC (rev 36364)
@@ -23,15 +23,17 @@
private String id;
private String name;
private int priority;
+ private String description;
private Set<Tutorial> tutorials = new TreeSet<Tutorial>();
public TutorialCategory() {
}
- public TutorialCategory(String id, String name, int priority) {
+ public TutorialCategory(String id, String name, int priority, String description) {
this.id = id;
this.name = name;
this.priority = priority;
+ this.description = description;
}
public String getId() {
@@ -84,12 +86,6 @@
}
@Override
- public String toString() {
- return "TutorialCategory [id=" + id + ", name=" + name + ", priority="
- + priority + "]";
- }
-
- @Override
public int compareTo(TutorialCategory o) {
if (o == null)
return 1;
@@ -105,4 +101,18 @@
return tutorials;
}
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Override
+ public String toString() {
+ return "TutorialCategory [id=" + id + ", name=" + name + ", priority="
+ + priority + ", description=" + description + "]";
+ }
+
}
13 years, 1 month
JBoss Tools SVN: r36363 - in workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp: 7.0.2-SNAPSHOT and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-11-16 05:46:04 -0500 (Wed, 16 Nov 2011)
New Revision: 36363
Added:
workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/_maven.repositories
workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/m2e-lastUpdated.properties
workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/maven-metadata-local.xml
workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/resolver-status.properties
workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/maven-metadata-local.xml
Modified:
workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/jboss-javaee6-ear-webapp-7.0.2-SNAPSHOT-sources.jar
workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/jboss-javaee6-ear-webapp-7.0.2-SNAPSHOT.jar
Log:
JBIDE-9774 : updated ear archetype to use the -Denterprise BOM pom switch
Added: workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/_maven.repositories
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/_maven.repositories (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/_maven.repositories 2011-11-16 10:46:04 UTC (rev 36363)
@@ -0,0 +1,5 @@
+#NOTE: This is an internal implementation file, its format can be changed without prior notice.
+#Wed Nov 16 11:42:51 CET 2011
+jboss-javaee6-ear-webapp-7.0.2-SNAPSHOT.jar>=
+jboss-javaee6-ear-webapp-7.0.2-SNAPSHOT.pom>=
+jboss-javaee6-ear-webapp-7.0.2-SNAPSHOT-sources.jar>=
Modified: workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/jboss-javaee6-ear-webapp-7.0.2-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Modified: workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/jboss-javaee6-ear-webapp-7.0.2-SNAPSHOT.jar
===================================================================
(Binary files differ)
Added: workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/m2e-lastUpdated.properties
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/m2e-lastUpdated.properties (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/m2e-lastUpdated.properties 2011-11-16 10:46:04 UTC (rev 36363)
@@ -0,0 +1,5 @@
+#Wed Nov 16 11:40:59 CET 2011
+archetypeRepo|http\://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/snapshot/|null=1320850559970
+eap6-repo|file\://D\:/Dev/maven/jboss-eap-6.0.0.Alpha2-maven-repository|null=1321440059123
+central|http\://repo1.maven.org/maven2|null=1321440059123
+archetype|http\://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/snapshot/|null=1320850566301
Added: workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/maven-metadata-local.xml
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/maven-metadata-local.xml (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/maven-metadata-local.xml 2011-11-16 10:46:04 UTC (rev 36363)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.jboss.spec.archetypes</groupId>
+ <artifactId>jboss-javaee6-ear-webapp</artifactId>
+ <version>7.0.2-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20111116104251</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <classifier>sources</classifier>
+ <extension>jar</extension>
+ <value>7.0.2-SNAPSHOT</value>
+ <updated>20111116104251</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>7.0.2-SNAPSHOT</value>
+ <updated>20111116104251</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>7.0.2-SNAPSHOT</value>
+ <updated>20111116104251</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
Added: workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/resolver-status.properties
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/resolver-status.properties (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/7.0.2-SNAPSHOT/resolver-status.properties 2011-11-16 10:46:04 UTC (rev 36363)
@@ -0,0 +1,6 @@
+#NOTE: This is an internal implementation file, its format can be changed without prior notice.
+#Wed Nov 09 13:22:56 CET 2011
+maven-metadata-archetypeRepo.xml.lastUpdated=1320841371659
+maven-metadata-archetypeRepo.xml.error=
+maven-metadata-archetype.xml.lastUpdated=1320841376845
+maven-metadata-archetype.xml.error=
Added: workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/maven-metadata-local.xml
===================================================================
--- workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/maven-metadata-local.xml (rev 0)
+++ workspace/fred/repositories/snapshot/org/jboss/spec/archetypes/jboss-javaee6-ear-webapp/maven-metadata-local.xml 2011-11-16 10:46:04 UTC (rev 36363)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.jboss.spec.archetypes</groupId>
+ <artifactId>jboss-javaee6-ear-webapp</artifactId>
+ <versioning>
+ <versions>
+ <version>7.1.0-SNAPSHOT</version>
+ <version>7.0.2-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20111116104251</lastUpdated>
+ </versioning>
+</metadata>
13 years, 1 month
JBoss Tools SVN: r36362 - in trunk/maven/tests/org.jboss.tools.maven.ui.bot.test: src/org/jboss/tools/maven/ui/bot/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-11-16 05:26:39 -0500 (Wed, 16 Nov 2011)
New Revision: 36362
Added:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/JBossPerspectiveTest.java
Modified:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java
Log:
JBIDE-10146 : add "Maven Project" to the "New" menu of the JBoss Perspective
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2011-11-16 02:59:25 UTC (rev 36361)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2011-11-16 10:26:39 UTC (rev 36362)
@@ -38,7 +38,8 @@
org.eclipse.jst.jee.web,
org.eclipse.m2e.lifecyclemapping.defaults;bundle-version="[1.0,1.1)",
org.eclipse.m2e.launching;bundle-version="[1.0,1.1)",
- org.eclipse.m2e.tests.common;bundle-version="[1.0.0,1.1.0)"
+ org.eclipse.m2e.tests.common;bundle-version="[1.0.0,1.1.0)",
+ org.jboss.tools.common.ui;bundle-version="3.3.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Eclipse-RegisterBuddy: org.apache.log4j
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/JBossPerspectiveTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/JBossPerspectiveTest.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/JBossPerspectiveTest.java 2011-11-16 10:26:39 UTC (rev 36362)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.maven.ui.bot.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.ui.WorkbenchException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Alexey Kazakov
+ * @author Fred Bricon
+ *
+ */
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class JBossPerspectiveTest extends TestCase {
+
+ /**
+ * Tests JBoss perspective has Maven stuff
+ * See https://issues.jboss.org/browse/JBIDE-10146
+ */
+ @Test
+ public void testJBossPerspective() throws WorkbenchException {
+ SWTWorkbenchBot bot = new SWTWorkbenchBot();
+ bot.viewByTitle("Welcome").close();
+ bot.menu("Window").menu("Open Perspective").menu("Other...").click();
+ SWTBotShell shell = bot.shell("Open Perspective");
+ shell.activate();
+ bot.table().select("JBoss");
+ bot.button("OK").click();
+ SWTBotMenu menu = bot.menu("New");
+ assertNotNull("Maven Project Menu not found", menu.menu("Maven Project"));
+
+ /*
+ same test in pure junit
+ IWorkbenchPage page = WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage(JBossPerspectiveFactory.PERSPECTIVE_ID, null);
+ assertNotNull(page);
+ List<String> shortcuts = Arrays.asList(page.getNewWizardShortcuts());
+ String mavenWizardId = "org.eclipse.m2e.core.wizards.Maven2ProjectWizard";
+ assertTrue("Have not found "+ mavenWizardId +" in " + JBossPerspectiveFactory.PERSPECTIVE_ID, shortcuts.contains(mavenWizardId));
+ */
+ }
+}
\ No newline at end of file
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java 2011-11-16 02:59:25 UTC (rev 36361)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java 2011-11-16 10:26:39 UTC (rev 36362)
@@ -21,6 +21,7 @@
@Suite.SuiteClasses({
//MavenProfileSelectionTest.class, FIXME enable tests for profiles
+ JBossPerspectiveTest.class,
CreateMavenizedSeamProjectTest.class,
})
@RunWith(Suite.class)
13 years, 1 month
JBoss Tools SVN: r36361 - in trunk/documentation/guides/GettingStartedGuide/en-US: images/getting_started and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-11-15 21:59:25 -0500 (Tue, 15 Nov 2011)
New Revision: 36361
Added:
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_05.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_06.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_07.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_08.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_09.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_01.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_02.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_03.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_04.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_05.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_06.png
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
Log:
updated for JBoss Central
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2011-11-16 02:03:49 UTC (rev 36360)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2011-11-16 02:59:25 UTC (rev 36361)
@@ -153,7 +153,11 @@
</mediaobject>
</figure>
<para>
- From the <guilabel>Create Projects</guilabel> section you can create
+ From the <guilabel>Create Projects</guilabel> section you can create a <guilabel>Dynamic Web Project</guilabel>, <guilabel>Seam 2 Web Project</guilabel>, <guilabel>Maven Project</guilabel> or any one of many <guilabel>Project Examples</guilabel>. To access a complete list of projects you can create, click on the window icon at the top-right of the <guilabel>Create Projects</guilabel> section <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_icon_01.png"/>
+ </imageobject>
+ </inlinemediaobject>.
</para>
<figure>
<title>Creating a Project</title>
@@ -164,6 +168,81 @@
</mediaobject>
</figure>
<para>
+ Under the <guilabel>Project Examples</guilabel> section you can expand and view <guilabel>Java EE 6 Quickstarts</guilabel>, <guilabel>JBoss AS 7 Quickstarts</guilabel> and <guilabel>Seam 2 Tutorials</guilabel>.
+ </para>
+ <figure>
+ <title>Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_05.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ You can also download other examples and install and set runtime preferences through the <guilabel>Project Examples</guilabel> section by using the five buttons at the top-right. The first button <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_icon_02.png"/>
+ </imageobject>
+ </inlinemediaobject> launches a <guilabel>New Project Examples</guilabel> wizard. Here you can search and download project examples to assist you with getting started.
+ </para>
+ <figure>
+ <title>New Project Examples wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_06.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ By clicking on the second button <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_icon_03.png"/>
+ </imageobject>
+ </inlinemediaobject> you will be taken directly to the <guilabel>JBoss Tools Runtime Detection</guilabel> dialog within <guilabel>Preferences</guilabel>.
+ </para>
+ <figure>
+ <title>JBoss Tools Runtime Detection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_07.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The third <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_icon_04.png"/>
+ </imageobject>
+ </inlinemediaobject> and fourth <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_icon_05.png"/>
+ </imageobject>
+ </inlinemediaobject> buttons take you directly to the <guilabel>Seam 2</guilabel> runtime and <guilabel>Server Runtime Environments</guilabel> preference dialogs respectively.
+ </para>
+ <figure>
+ <title>Seam 2 runtime preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_08.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure>
+ <title>Server Runtime Environments preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_09.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The final button <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_icon_06.png"/>
+ </imageobject>
+ </inlinemediaobject> refreshes the <guilabel>Project Examples</guilabel> list.
+ </para>
+ <para>
If you do not wish to see JBoss Central at every startup, you can deselect the checkbox <guilabel>Show on Startup</guilabel> in the <guilabel>Settings</guilabel> section.
</para>
</section>
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_05.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_05.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_06.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_06.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_07.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_07.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_08.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_08.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_09.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_09.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_01.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_01.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_02.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_02.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_03.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_03.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_04.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_04.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_05.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_05.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_06.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_icon_06.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
13 years, 1 month
JBoss Tools SVN: r36360 - trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-11-15 21:03:49 -0500 (Tue, 15 Nov 2011)
New Revision: 36360
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
Log:
updated test "CDI Validator validates resources from output folder" https://issues.jboss.org/browse/JBIDE-10166
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-11-16 00:49:18 UTC (rev 36359)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-11-16 02:03:49 UTC (rev 36360)
@@ -953,7 +953,8 @@
public void testCreateBeanClassResolution() throws CoreException{
checkResolution(tckProject,
new String[]{
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
+ //"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
+ "WebContent/WEB-INF/beans.xml"
},
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
@@ -964,7 +965,8 @@
public void testCreateStereotypeResolution() throws CoreException{
checkResolution(tckProject,
new String[]{
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
+ //"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
+ "WebContent/WEB-INF/beans.xml"
},
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
@@ -975,7 +977,8 @@
public void testCreateInterceptorResolution() throws CoreException{
checkResolution(tckProject,
new String[]{
- "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
+ //"JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/beans.xml"
+ "WebContent/WEB-INF/beans.xml"
},
CDICoreValidator.PROBLEM_TYPE,
CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
13 years, 1 month
JBoss Tools SVN: r36359 - trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-15 19:49:18 -0500 (Tue, 15 Nov 2011)
New Revision: 36359
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java
Log:
JBIDE-10177
https://issues.jboss.org/browse/JBIDE-10177
Fix for verification of error page with .xhtml extension, when default suffix is not specified.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java 2011-11-16 00:20:01 UTC (rev 36358)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java 2011-11-16 00:49:18 UTC (rev 36359)
@@ -53,14 +53,15 @@
if("true".equals(rule.getProperty("acceptEmpty"))) return null; //$NON-NLS-1$ //$NON-NLS-2$
return fire(object, attribute + ".empty", attribute, null); //$NON-NLS-1$
}
- String value1 = !value.startsWith("/") ? "/" + value : value; //$NON-NLS-1$ //$NON-NLS-2$
- XModelObject tld = XModelImpl.getByRelativePath(model, value1);
- if(tld == null) {
- return fire(object, attribute + ".exists", attribute, value); //$NON-NLS-1$
+
+ XModelObject o = null;
+ for (Object v: list) {
+ String valuei = v.toString();
+ String value2 = valuei.startsWith("/") ? valuei.substring(1) : valuei; //$NON-NLS-1$
+ o = webRoot.getChildByPath(value2);
+ if(o != null) break;
}
- String value2 = value.startsWith("/") ? value.substring(1) : value; //$NON-NLS-1$
- XModelObject tld2 = webRoot.getChildByPath(value2);
- if(tld2 == null) {
+ if(o == null) {
return fire(object, attribute + ".exists", attribute, value); //$NON-NLS-1$
}
if(!checkExtensions(value)) {
13 years, 1 month
JBoss Tools SVN: r36358 - in trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf: web/pattern and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-15 19:20:01 -0500 (Tue, 15 Nov 2011)
New Revision: 36358
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PostfixUrlPattern.java
Log:
JBIDE-10177
https://issues.jboss.org/browse/JBIDE-10177
Fix for verification of error page with .xhtml extension, when default suffix is not specified.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java 2011-11-16 00:17:49 UTC (rev 36357)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java 2011-11-16 00:20:01 UTC (rev 36358)
@@ -160,8 +160,13 @@
} else if(JSF_CONVERT_URL_TO_PATH.equals(id)) {
if(!EclipseResourceUtil.hasNature(model, JSFNature.NATURE_ID)) return EMPTY_LIST;
ArrayList<Object> list = new ArrayList<Object>();
- String path = JSFWebProject.getInstance(model).getUrlPattern().getJSFPath(prefix);
- if(path != null && path.length() > 0) list.add(path);
+ List<String> paths = JSFWebProject.getInstance(model).getUrlPattern().getJSFPaths(prefix);
+ if(!paths.isEmpty()) {
+ list.addAll(paths);
+ } else {
+ String path = JSFWebProject.getInstance(model).getUrlPattern().getJSFPath(prefix);
+ if(path != null && path.length() > 0) list.add(path);
+ }
return list;
} else if(JSF_GET_TAGLIBS.equals(id)) {
ArrayList<Object> list = new ArrayList<Object>();
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java 2011-11-16 00:17:49 UTC (rev 36357)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PatternLoader.java 2011-11-16 00:20:01 UTC (rev 36358)
@@ -18,7 +18,7 @@
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
public class PatternLoader {
- static String DEFAULT_FILE_SUFFIX = ".jsp";
+ public static final String[] DEFAULT_SUFFIXES = {".jsp", ".xhtml", ".jspx"};
public static JSFUrlPattern DEFAULT_PATTERN = new PostfixUrlPattern();
static JSFUrlPattern[] DEFAULT_PATTERNS = new JSFUrlPattern[]{DEFAULT_PATTERN};
CompoundPattern pattern = new CompoundPattern();
@@ -37,7 +37,7 @@
pattern.setPatterns(DEFAULT_PATTERNS);
return;
}
- String fileSuffix = getFileSuffix(webxml);
+ String[] fileSuffixes = getFileSuffix(webxml);
ArrayList<JSFUrlPattern> list = new ArrayList<JSFUrlPattern>();
String servletName = getFacesServletName(webxml);
for (int i = 0; i < mappings.length; i++) {
@@ -46,18 +46,18 @@
String pattern = mappings[i].getAttributeValue("url-pattern");
JSFUrlPattern up = load(pattern);
if(up instanceof PostfixUrlPattern) {
- ((PostfixUrlPattern)up).setFileSuffix(fileSuffix);
+ ((PostfixUrlPattern)up).setFileSuffixes(fileSuffixes);
}
if(up != null) {
list.add(up);
}
}
- if(list.size() == 0 && fileSuffix.equals(DEFAULT_FILE_SUFFIX)) {
+ if(list.size() == 0 && fileSuffixes == DEFAULT_SUFFIXES) {
pattern.setPatterns(DEFAULT_PATTERNS);
} else if(list.size() == 0) {
JSFUrlPattern[] ps = new JSFUrlPattern[1];
ps[0] = new PostfixUrlPattern();
- ((PostfixUrlPattern)ps[0]).setFileSuffix(fileSuffix);
+ ((PostfixUrlPattern)ps[0]).setFileSuffixes(fileSuffixes);
pattern.setPatterns(ps);
} else {
pattern.setPatterns((JSFUrlPattern[])list.toArray(new JSFUrlPattern[0]));
@@ -70,9 +70,9 @@
return (s != null) ? s.getAttributeValue("servlet-name") : "FacesServlet";
}
- String getFileSuffix(XModelObject webxml) {
+ String[] getFileSuffix(XModelObject webxml) {
String[] list = WebAppHelper.getWebAppContextParamValueList(webxml, "javax.faces.DEFAULT_SUFFIX");
- return list == null || list.length == 0 || !list[0].startsWith(".") ? DEFAULT_FILE_SUFFIX : list[0];
+ return list == null || list.length == 0 || !list[0].startsWith(".") ? DEFAULT_SUFFIXES : list;
}
JSFUrlPattern load(String p) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PostfixUrlPattern.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PostfixUrlPattern.java 2011-11-16 00:17:49 UTC (rev 36357)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/pattern/PostfixUrlPattern.java 2011-11-16 00:20:01 UTC (rev 36358)
@@ -15,24 +15,19 @@
public class PostfixUrlPattern implements JSFUrlPattern {
protected String postfix = ".jsf";
- protected String fileSuffix = ".jsp";
/*
* Fixes https://jira.jboss.org/jira/browse/JBIDE-5577
* Fixes https://jira.jboss.org/jira/browse/JBIDE-5635
* JSF files could be mapped to xhtml or jspx files also.
* All of this extensions should be checked.
*/
- protected String[] fileExtensions = {".jsp", ".xhtml", ".jspx"};
+ protected String[] fileExtensions = PatternLoader.DEFAULT_SUFFIXES;
public void setPostfix(String postfix) {
this.postfix = postfix;
}
- public void setFileSuffix(String s) {
- fileSuffix = s;
- }
-
- public void setFileExtentions(String[] fileExtentions) {
+ public void setFileSuffixes(String[] fileExtentions) {
this.fileExtensions = fileExtentions;
}
@@ -41,12 +36,21 @@
}
public boolean isJSFUrl(String path) {
- return (path.endsWith(postfix) || path.endsWith(fileSuffix));
+ if(path.endsWith(postfix)) {
+ return true;
+ }
+ for (String fileSuffix: fileExtensions) {
+ if(path.endsWith(fileSuffix)) {
+ return true;
+ }
+ }
+ return false;
}
public String getJSFPath(String url) {
if(url == null || url.length() == 0) return url;
- return (url.endsWith(postfix)) ? url.substring(0, url.length() - postfix.length()) + fileSuffix : url;
+ List<String> ps = getJSFPaths(url);
+ return (ps.isEmpty()) ? url : ps.get(0);
}
public List<String> getJSFPaths(String url) {
13 years, 1 month
JBoss Tools SVN: r36357 - in trunk/jsf/tests/org.jboss.tools.jsf.verification.test: projects/Test/WebContent/WEB-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-15 19:17:49 -0500 (Tue, 15 Nov 2011)
New Revision: 36357
Added:
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/projects/Test/WebContent/pages/404.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/projects/Test/WebContent/pages/405.jsp
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/projects/Test/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/WebVerificationTest.java
Log:
JBIDE-10177
https://issues.jboss.org/browse/JBIDE-10177
Test added for verification of error page with .xhtml extension, when default suffix is not specified.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/projects/Test/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.verification.test/projects/Test/WebContent/WEB-INF/web.xml 2011-11-15 23:10:49 UTC (rev 36356)
+++ trunk/jsf/tests/org.jboss.tools.jsf.verification.test/projects/Test/WebContent/WEB-INF/web.xml 2011-11-16 00:17:49 UTC (rev 36357)
@@ -43,4 +43,16 @@
<exception-type>java.lang.Exception</exception-type>
<location>/error2</location>
</error-page>
+ <error-page>
+ <error-code>404</error-code>
+ <location>pages/404.jsf</location>
+ </error-page>
+ <error-page>
+ <error-code>405</error-code>
+ <location>pages/405.jsf</location>
+ </error-page>
+ <error-page>
+ <error-code>400</error-code>
+ <location>pages/400.jsf</location>
+ </error-page>
</web-app>
Added: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/projects/Test/WebContent/pages/404.xhtml
===================================================================
Added: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/projects/Test/WebContent/pages/405.jsp
===================================================================
Modified: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/WebVerificationTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/WebVerificationTest.java 2011-11-15 23:10:49 UTC (rev 36356)
+++ trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/WebVerificationTest.java 2011-11-16 00:17:49 UTC (rev 36357)
@@ -54,6 +54,10 @@
AbstractResourceMarkerTest.assertMarkerIsNotCreated(web, MARKER_TYPE, "error: Attribute location references to /error that does not exist in web content", 40);
AbstractResourceMarkerTest.assertMarkerIsCreated(web, MARKER_TYPE, "error: Attribute location references to /error2 that does not exist in web content", 44);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(web, MARKER_TYPE, "error: Attribute location references to .* that does not exist in web content", 48);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(web, MARKER_TYPE, "error: Attribute location references to .* that does not exist in web content", 52);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(web, MARKER_TYPE, "error: Attribute location references to pages/400.* that does not exist in web content", 56);
+
IMarker[] markers = web.findMarkers(null, true, IResource.DEPTH_INFINITE);
for (IMarker marker: markers) {
int line = marker.getAttribute(IMarker.LINE_NUMBER, -1);
13 years, 1 month