JBoss Tools SVN: r7310 - trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-04-03 18:37:14 -0400 (Thu, 03 Apr 2008)
New Revision: 7310
Modified:
trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core/ArchivesCoreTest.java
Log:
Didn't replace original archives core (workspace)
Modified: trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core/ArchivesCoreTest.java
===================================================================
--- trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core/ArchivesCoreTest.java 2008-04-03 22:13:32 UTC (rev 7309)
+++ trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/core/ArchivesCoreTest.java 2008-04-03 22:37:14 UTC (rev 7310)
@@ -39,14 +39,34 @@
*
*/
public class ArchivesCoreTest extends TestCase {
+ private static WorkspaceArchivesCore workspaceCore;
+ private static AntArchivesCore antCore;
+
public void testArchivesCore() {
ArchivesCore core = ArchivesCore.getInstance();
assertEquals(ArchivesCore.WORKSPACE, core.getRunType());
assertEquals(WorkspaceArchivesCore.class, core.getClass());
+ workspaceCore = (WorkspaceArchivesCore)core;
AntArchivesCore core2 = new AntArchivesCore();
ArchivesCore.setInstance(core2);
+ assertEquals(ArchivesCore.STANDALONE, ArchivesCore.getInstance().getRunType());
+ antCore = core2;
- assertEquals(ArchivesCore.STANDALONE, ArchivesCore.getInstance().getRunType());
+ ArchivesCore.setInstance(core);
}
+
+ /**
+ * @return the workspaceCore
+ */
+ public static WorkspaceArchivesCore getWorkspaceCore() {
+ return workspaceCore;
+ }
+
+ /**
+ * @return the antCore
+ */
+ public static AntArchivesCore getAntCore() {
+ return antCore;
+ }
}
17 years, 8 months
JBoss Tools SVN: r7309 - in trunk/core: tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-04-03 18:13:32 -0400 (Thu, 03 Apr 2008)
New Revision: 7309
Added:
trunk/core/tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject/Resources/images2/
trunk/core/tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject/Resources/images2/prop_ps.gif
trunk/core/tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject/Resources/images2/single_file.gif
trunk/core/tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject/outputs/
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java
trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java
Log:
JBIDE-943 - flatten support
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java 2008-04-03 18:25:09 UTC (rev 7308)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java 2008-04-03 22:13:32 UTC (rev 7309)
@@ -136,10 +136,10 @@
public static void copyFiles(IArchiveFileSet fileset, final IPath[] paths) {
copyFiles(fileset, paths, true);
}
- public static void copyFiles(IArchiveFileSet fileset, final IPath[] paths, boolean sync) {
- final File[] destFiles = getFiles(paths, fileset);
- for( int i = 0; i < paths.length; i++ ) {
- TrueZipUtil.copyFile(paths[i].toOSString(), destFiles[i]);
+ public static void copyFiles(IArchiveFileSet fileset, final IPath[] sourcePaths, boolean sync) {
+ final File[] destFiles = getFiles(sourcePaths, fileset);
+ for( int i = 0; i < sourcePaths.length; i++ ) {
+ TrueZipUtil.copyFile(sourcePaths[i].toOSString(), destFiles[i]);
}
if( sync )
TrueZipUtil.sync();
@@ -194,7 +194,7 @@
/**
- * Gets all properly-created de.sch files for a fileset
+ * Gets all properly-created de.sch destination files for a fileset
* @param inputFiles
* @param fs
* @return
@@ -205,7 +205,10 @@
File[] returnFiles = new File[inputFiles.length];
int fsLength = fs.getGlobalSourcePath().toOSString().length()+1;
for( int i = 0; i < inputFiles.length; i++ ) {
- filesetRelative = inputFiles[i].toOSString().substring(fsLength);
+ if( fs.isFlattened() )
+ filesetRelative = inputFiles[i].lastSegment();
+ else
+ filesetRelative = inputFiles[i].toOSString().substring(fsLength);
returnFiles[i] = new File(fsFile, filesetRelative, ArchiveDetector.DEFAULT);
}
return returnFiles;
Added: trunk/core/tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject/Resources/images2/prop_ps.gif
===================================================================
(Binary files differ)
Property changes on: trunk/core/tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject/Resources/images2/prop_ps.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/core/tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject/Resources/images2/single_file.gif
===================================================================
(Binary files differ)
Property changes on: trunk/core/tests/org.jboss.ide.eclipse.archives.test/inputs/projects/GenericProject/Resources/images2/single_file.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java
===================================================================
--- trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java 2008-04-03 18:25:09 UTC (rev 7308)
+++ trunk/core/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java 2008-04-03 22:13:32 UTC (rev 7309)
@@ -37,6 +37,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
import org.jboss.ide.eclipse.archives.core.util.internal.ModelTruezipBridge;
import org.jboss.ide.eclipse.archives.core.util.internal.TrueZipUtil;
import org.jboss.ide.eclipse.archives.test.ArchivesTest;
@@ -125,6 +126,7 @@
} catch( AssertionFailedError re ) {
System.out.println("gah");
}
+
// zip inside zip
IArchive zipInZip = createArchive("zipInZip.jar", "");
zipInZip.setExploded(false);
@@ -133,6 +135,125 @@
assertEquals(2, countEntries(zipF));
}
+ public void testCreateFileInWorkspace() {
+ IArchive zipped = createArchive("zipped.war", new Path(proj.getName()).append("outputs").toString());
+ zipped.setInWorkspace(true);
+ zipped.setExploded(false);
+ ModelTruezipBridge.createFile(zipped);
+ File zippedF = proj.getLocation().append("outputs").append("zipped.war").toFile();
+ assertTrue(zippedF.exists());
+ assertTrue(!zippedF.isDirectory());
+
+ // inner child; zip inside zip
+ IArchive zipInZip = createArchive("zipInZip.jar", "");
+ zipInZip.setExploded(false);
+ zipped.addChild(zipInZip);
+ ModelTruezipBridge.createFile(zipInZip);
+ assertEquals(1, countEntries(zippedF));
+ }
+
+ public void testNoSync() {
+ // zipped
+ IArchive zipped = createArchive("zipped.war", outputs.toString());
+ zipped.setInWorkspace(false);
+ zipped.setExploded(false);
+ ModelTruezipBridge.createFile(zipped);
+ File zipF = outputs.append("zipped.war").toFile();
+ assertTrue(zipF.exists());
+ assertFalse(zipF.isDirectory());
+
+ // zip inside zip
+ IArchive zipInZip = createArchive("zipInZip.jar", "");
+ zipInZip.setExploded(false);
+ zipped.addChild(zipInZip);
+ ModelTruezipBridge.createFile(zipInZip);
+ assertEquals(1, countEntries(zipF));
+
+ // zip inside zip2
+ IArchive zipInZip2 = createArchive("zipInZip2.jar", "");
+ zipInZip.setExploded(false);
+ zipped.addChild(zipInZip2);
+ ModelTruezipBridge.createFile(zipInZip2, false);
+ assertEquals(1, countEntries(zipF));
+ TrueZipUtil.umount();
+ assertEquals(2, countEntries(zipF));
+ }
+
+
+ public void testDeleteArchive() {
+ IArchive zipped = createArchive("zipped.war", new Path(proj.getName()).append("outputs").toString());
+ zipped.setInWorkspace(true);
+ zipped.setExploded(false);
+ ModelTruezipBridge.createFile(zipped);
+ File zippedF = proj.getLocation().append("outputs").append("zipped.war").toFile();
+ assertTrue(zippedF.exists());
+ assertTrue(!zippedF.isDirectory());
+
+ // inner child; zip inside zip
+ IArchive zipInZip = createArchive("zipInZip.jar", "");
+ zipInZip.setExploded(false);
+ zipped.addChild(zipInZip);
+ ModelTruezipBridge.createFile(zipInZip);
+ assertEquals(1, countEntries(zippedF));
+
+ // inner child; zip inside zip
+ IArchive zipInZip2 = createArchive("zipInZip2.jar", "");
+ zipInZip2.setExploded(false);
+ zipped.addChild(zipInZip2);
+ ModelTruezipBridge.createFile(zipInZip2);
+ assertEquals(2, countEntries(zippedF));
+
+ ModelTruezipBridge.deleteArchive(zipInZip2);
+ assertEquals(1, countEntries(zippedF));
+
+ ModelTruezipBridge.deleteArchive(zipped);
+ assertFalse(zippedF.exists());
+ }
+
+
+ /*
+ * Fileset-related
+ */
+ public void testFileset() {
+ IArchive zipped = createArchive("zipped.war", new Path(proj.getName()).append("outputs").toString());
+ zipped.setInWorkspace(true);
+ zipped.setExploded(false);
+ ModelTruezipBridge.createFile(zipped);
+ File zippedF = proj.getLocation().append("outputs").append("zipped.war").toFile();
+ assertTrue(zippedF.exists());
+ assertTrue(!zippedF.isDirectory());
+
+ IArchiveFileSet fs = createFileSet("**/*.gif", proj.getName());
+ fs.setInWorkspace(true);
+ zipped.addChild(fs);
+ ModelTruezipBridge.fullFilesetBuild(fs);
+ assertEquals(19, countEntries(zippedF));
+ }
+
+ public void testFlattenedFileset() {
+ IArchive zipped = createArchive("zipped.war", new Path(proj.getName()).append("outputs").toString());
+ zipped.setInWorkspace(true);
+ zipped.setExploded(false);
+ ModelTruezipBridge.createFile(zipped);
+ File zippedF = proj.getLocation().append("outputs").append("zipped.war").toFile();
+ assertTrue(zippedF.exists());
+ assertTrue(!zippedF.isDirectory());
+
+ IArchiveFileSet fs = createFileSet("**/*.gif", proj.getName());
+ fs.setInWorkspace(true);
+ fs.setFlattened(true);
+ zipped.addChild(fs);
+ ModelTruezipBridge.fullFilesetBuild(fs);
+
+ // should be two less files and 3 less folders created
+ assertEquals(14, countEntries(zippedF));
+ }
+
+
+ /*
+ * Utility
+ */
+
protected int countEntries(File zipF) {
ZipFile zf = null;
17 years, 8 months
JBoss Tools SVN: r7308 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-04-03 14:25:09 -0400 (Thu, 03 Apr 2008)
New Revision: 7308
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-1283 - thanks dennis ;)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2008-04-03 18:08:04 UTC (rev 7307)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2008-04-03 18:25:09 UTC (rev 7308)
@@ -530,6 +530,10 @@
id="jst.java"
version="5.0">
</facet>
+ <facet
+ id="jst.seam"
+ version="1.2">
+ </facet>
</default-facets>
</extension>
<extension
17 years, 8 months
JBoss Tools SVN: r7307 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-04-03 14:08:04 -0400 (Thu, 03 Apr 2008)
New Revision: 7307
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1983, ValueHelper was added as property for class JSPPropertySourceAdapter, because of creating this class on each method locally strongly decrease perfomance of VPE. Also from ValueHelper was removed "IVisualContext iVisualContex;" property, which by Snjezana Peco words causes a memory leak(JBIDE-1896).
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2008-04-03 15:58:18 UTC (rev 7306)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2008-04-03 18:08:04 UTC (rev 7307)
@@ -59,11 +59,11 @@
protected final static String CATEGORY_ATTRIBUTES = XMLUIMessages.XMLPropertySourceAdapter_0;
private static final boolean SET_EXPERT_FILTER = false;
- private AttributeSorter sorter = null;
+ private AttributeSorter sorter = null;
private Node fNode = null;
private boolean fCaseSensitive = true;
private IPropertyDescriptor[] fDescriptors = null;
- //private ValueHelper valueHelper = new ValueHelper();
+ private ValueHelper valueHelper = new ValueHelper();
private Set attributeNames = new HashSet();
public JSPPropertySourceAdapter(INodeNotifier target) {
@@ -122,7 +122,6 @@
private String getQuery(String attributeName) {
String tagName = fNode.getNodeName();
String jsfTagName = null;
- ValueHelper valueHelper = new ValueHelper();
if(fNode instanceof Element) {
jsfTagName = valueHelper.getFaceletJsfTag((Element)fNode);
}
@@ -145,7 +144,7 @@
List<String> names = new ArrayList<String>();
List<String> namesLow = new ArrayList<String>();
IPropertyDescriptor descriptor;
- ValueHelper valueHelper = new ValueHelper();
+
TagDescriptor td = valueHelper.getTagDescriptor("/" + fNode.getNodeName());
if(td != null) {
List list = td.getAttributesDescriptors();
@@ -275,7 +274,6 @@
}
private IPropertyDescriptor createJSPPropertyDescriptor(String query, String attributeName, boolean hideOnFilter) {
- ValueHelper valueHelper = new ValueHelper();
AttributeDescriptor d = valueHelper.getAttributeDescriptor(query);
return createJSPPropertyDescriptor(d, attributeName, hideOnFilter);
}
@@ -290,7 +288,7 @@
context.put("node", fNode);
context.setProperty("nodeName", fNode.getNodeName());
context.setProperty("attributeName", attributeName);
- //context.put("valueHelper", valueHelper);
+ context.put("valueHelper", valueHelper);
JSPPropertyDescriptor descriptor = new JSPPropertyDescriptor(context, attributeName, attributeName);
descriptor.setCategory(getCategory(null));
descriptor.setDescription(attributeName);
@@ -333,7 +331,7 @@
protected void updatePropertyDescriptors() {
if (fDescriptors == null || fDescriptors.length == 0) return;
- ValueHelper valueHelper = new ValueHelper();
+
// List of all names encountered in the tag and defined by the element
List<String> declaredNames = new ArrayList<String>();
// New descriptor list that will become fDescriptors after all
@@ -548,7 +546,6 @@
if (attr instanceof IDOMNode) {
((IDOMNode) attr).setValueSource(valueString);
try {
- ValueHelper valueHelper = new ValueHelper();
IVisualController controller = valueHelper.getController();
if(controller != null) controller.visualRefresh();
} catch (Exception e) {
@@ -586,7 +583,6 @@
boolean isRequiredAttribute(String attributeName) {
String query = getQuery(attributeName);
- ValueHelper valueHelper = new ValueHelper();
AttributeDescriptor d = valueHelper.getAttributeDescriptor(query);
if(d == null) return false; // do not remove unknown attribute? Remove it!
return d.isRequired();
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2008-04-03 15:58:18 UTC (rev 7306)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2008-04-03 18:08:04 UTC (rev 7307)
@@ -16,7 +16,6 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.text.IDocument;
@@ -65,7 +64,7 @@
import org.w3c.dom.Node;
public class ValueHelper {
- private IEditorInput editorInput = null;
+
private WTPTextJspKbConnector wtpTextJspKbConnector = null;
private boolean isFacelets = false;
@@ -77,9 +76,10 @@
seamPromptingProvider = (IPromptingProvider)o;
}
}
-
- IVisualContext iVisualContext = null;
- WtpKbConnector pageConnector = null;
+ //JBIDE-1983, coused a memmory link
+// IVisualContext iVisualContext = null;
+ private boolean isVisualContextInitialized = false;
+ private WtpKbConnector pageConnector = null;
public ValueHelper() {
boolean b = init();
@@ -96,25 +96,31 @@
}
boolean init() {
- if(iVisualContext != null || pageConnector != null) return true;
+ if(isVisualContextInitialized || pageConnector != null) return true;
IEditorPart editor = ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if(!(editor instanceof JSPMultiPageEditor)) return false;
JSPTextEditor jspEditor = ((JSPMultiPageEditor)editor).getJspEditor();
- //Added By Max Areshkau
- //Fix for JBIDE-788
- iVisualContext = jspEditor.getPageContext();
+ isVisualContextInitialized = true;
- editorInput = jspEditor.getEditorInput();
-
wtpTextJspKbConnector = jspEditor.getWTPTextJspKbConnector();
- if(iVisualContext != null) {
+ if(getIVisualContext() != null) {
updateFacelets();
}
- return iVisualContext != null || pageConnector != null;
+ return getIVisualContext() != null || pageConnector != null;
}
+ private IVisualContext getIVisualContext(){
+
+ IEditorPart editor = ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if(!(editor instanceof JSPMultiPageEditor)) return null;
+ JSPTextEditor jspEditor = ((JSPMultiPageEditor)editor).getJspEditor();
+
+ return jspEditor.getPageContext();
+ }
+
+
public ModelElement getInitalInput(String query) {
AttributeDescriptor descriptor = getAttributeDescriptor(query);
if(descriptor == null) return new RootElement("root", new ArrayList<AttributeValueResource>());
@@ -122,7 +128,7 @@
List<AttributeValueResource> elements = new ArrayList<AttributeValueResource>();
ModelElement root = new RootElement("root", elements);
for (int i = 0; i < valueDescriptors.length; i++) {
- AttributeValueResource resource = AttributeValueResourceFactory.getInstance().createResource(editorInput, wtpTextJspKbConnector, root, valueDescriptors[i].getType());
+ AttributeValueResource resource = AttributeValueResourceFactory.getInstance().createResource(getEditorInput(), wtpTextJspKbConnector, root, valueDescriptors[i].getType());
resource.setParams(valueDescriptors[i].getParams());
resource.setQuery(query, this);
elements.add(resource);
@@ -132,7 +138,7 @@
p.put("file", getFile());
List list = seamPromptingProvider.getList(null, "seam.is_seam_project", null, p);
if(list != null) {
- AttributeValueResource resource = AttributeValueResourceFactory.getInstance().createResource(editorInput, wtpTextJspKbConnector, root, "seamVariables");
+ AttributeValueResource resource = AttributeValueResourceFactory.getInstance().createResource(getEditorInput(), wtpTextJspKbConnector, root, "seamVariables");
resource.setQuery(query, this);
elements.add(resource);
}
@@ -169,17 +175,20 @@
}
public IEditorInput getEditorInput() {
- return editorInput;
+
+ IEditorPart editor = ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+
+ return editor.getEditorInput();
}
public IFile getFile() {
- if(!(editorInput instanceof IFileEditorInput)) return null;
- return ((IFileEditorInput)editorInput).getFile();
+ if(!(getEditorInput() instanceof IFileEditorInput)) return null;
+ return ((IFileEditorInput)getEditorInput()).getFile();
}
public IProject getProject() {
- if(!(editorInput instanceof IFileEditorInput)) return null;
- IFile file = ((IFileEditorInput)editorInput).getFile();
+ if(!(getEditorInput() instanceof IFileEditorInput)) return null;
+ IFile file = ((IFileEditorInput)getEditorInput()).getFile();
return file == null ? null : file.getProject();
}
@@ -189,6 +198,9 @@
public VpeTaglibManager getTaglibManager() {
init();
+
+ IVisualContext iVisualContext = getIVisualContext();
+
if(iVisualContext!=null && iVisualContext instanceof VpeTaglibManager) {
return (VpeTaglibManager)iVisualContext;
@@ -199,7 +211,7 @@
}
public WtpKbConnector getPageConnector() {
- if(iVisualContext != null) return iVisualContext.getConnector();
+ if(getIVisualContext() != null) return getIVisualContext().getConnector();
return pageConnector;
}
@@ -218,16 +230,15 @@
//Support of StructuredTextEditor
boolean init2() {
- if(iVisualContext != null || pageConnector != null) return true;
+ if(isVisualContextInitialized || pageConnector != null) return true;
IEditorPart editor = ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if(!(editor instanceof StructuredTextEditor)) return false;
StructuredTextEditor jspEditor = ((StructuredTextEditor)editor);
- editorInput = jspEditor.getEditorInput();
- IDocument document = jspEditor.getDocumentProvider().getDocument(editorInput);
+ IDocument document = jspEditor.getDocumentProvider().getDocument(getEditorInput());
if(document == null) return false;
installActivePropmtSupport(jspEditor, document);
getConnector(document);
- return iVisualContext != null || pageConnector != null;
+ return getIVisualContext() != null || pageConnector != null;
}
private void installActivePropmtSupport(StructuredTextEditor jspEditor, IDocument document) {
@@ -238,10 +249,10 @@
(getContentType(model).toLowerCase().indexOf("jsp") != -1 ||
getContentType(model).toLowerCase().indexOf("html") != -1)) {
clearTextConnectors();
- wtpTextJspKbConnector = (WTPTextJspKbConnector)wtpTextConnectors.get(editorInput);
+ wtpTextJspKbConnector = (WTPTextJspKbConnector)wtpTextConnectors.get(getEditorInput());
if(wtpTextJspKbConnector == null) {
wtpTextJspKbConnector = new WTPTextJspKbConnector(jspEditor.getEditorInput(), document, model);
- wtpTextConnectors.put(editorInput, wtpTextJspKbConnector);
+ wtpTextConnectors.put(getEditorInput(), wtpTextJspKbConnector);
}
/// wtpTextJspKbConnector.setTaglibManagerProvider(parentEditor);
}
@@ -315,6 +326,7 @@
}
public void updateFacelets() {
+
VpeTaglibManager tldManager = getTaglibManager();
if(tldManager == null) return;
List<TaglibData> list = tldManager.getTagLibs();
@@ -325,7 +337,7 @@
kbConnector.unregisterAllResources(true);
for(int i = 0; i < list.size(); i++) {
TaglibData data = list.get(i);
- FaceletsHtmlContentAssistProcessor.registerTld(data, kbConnector, document, editorInput);
+ FaceletsHtmlContentAssistProcessor.registerTld(data, kbConnector, document, getEditorInput());
isFacelets = isFacelets || data.getUri().equals(FaceletsHtmlContentAssistProcessor.faceletUri);
}
if(isFacelets) {
17 years, 8 months
JBoss Tools SVN: r7306 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-04-03 11:58:18 -0400 (Thu, 03 Apr 2008)
New Revision: 7306
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1484Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1720Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE788Test.java
Log:
was corrected tests
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1484Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1484Test.java 2008-04-03 15:58:15 UTC (rev 7305)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1484Test.java 2008-04-03 15:58:18 UTC (rev 7306)
@@ -1,13 +1,13 @@
/*******************************************************************************
-* Copyright (c) 2007 Red Hat, Inc.
-* Distributed under license by Red Hat, Inc. All rights reserved.
-* This program is made available under the terms of the
-* Eclipse Public License v1.0 which accompanies this distribution,
-* and is available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* Red Hat, Inc. - initial API and implementation
-******************************************************************************/
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.test.jbide;
import java.util.ArrayList;
@@ -31,25 +31,25 @@
*/
public class JBIDE1484Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "jsfTest";
-
- private static final String TEST_PAGE_NAME = "JBIDE/1484/JBIDE-1484.jsp";
-
+ public static final String IMPORT_PROJECT_NAME = "jsfTest";
+
+ private static final String TEST_PAGE_NAME = "JBIDE/1484/JBIDE-1484.jsp";
+
public JBIDE1484Test(String name) {
-
+
super(name);
}
-
- //test method for JBIDE 1484
- public void testJBIDE_1484() throws Throwable{
+
+ // test method for JBIDE 1484
+ public void testJBIDE_1484() throws Throwable {
// wait
TestUtil.waitForJobs();
// set exception
setException(null);
// get test page path
- IFile file = (IFile) TestUtil.getComponentPath(
- TEST_PAGE_NAME, IMPORT_PROJECT_NAME);
+ IFile file = (IFile) TestUtil.getComponentPath(TEST_PAGE_NAME,
+ IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file " + file.getFullPath(),
file);
@@ -63,28 +63,31 @@
// get dom document
nsIDOMDocument document = getVpeVisualDocument(part);
nsIDOMElement element = document.getDocumentElement();
-
- //check that element is not null
+
+ // check that element is not null
assertNotNull(element);
- // get root node
+ // get root node
nsIDOMNode node = (nsIDOMNode) element
- .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
-
+
// find "input" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_INPUT);
-
+
assertEquals(3, elements.size());
- nsIDOMElement elementInput0 = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement elementInput1 = (nsIDOMElement) elements.get(1).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement elementInput2 = (nsIDOMElement) elements.get(2).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- assertEquals(elementInput0.getAttribute("value"),"");
- assertEquals(elementInput1.getAttribute("value"),"");
- assertEquals(elementInput2.getAttribute("value"),"test");
- if(getException()!=null) {
+ nsIDOMElement elementInput0 = (nsIDOMElement) elements.get(0)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement elementInput1 = (nsIDOMElement) elements.get(1)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement elementInput2 = (nsIDOMElement) elements.get(2)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals(" ", elementInput0.getAttribute("value"));
+ assertEquals(" ", elementInput1.getAttribute("value"));
+ assertEquals("test", elementInput2.getAttribute("value"));
+ if (getException() != null) {
throw getException();
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1720Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1720Test.java 2008-04-03 15:58:15 UTC (rev 7305)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1720Test.java 2008-04-03 15:58:18 UTC (rev 7306)
@@ -87,7 +87,7 @@
assertNotNull(inputElement);
String dir = inputElement.getAttribute(HTML.ATTR_DIR);
assertNotNull(dir);
- assertEquals("rtl", dir);
+ assertEquals("ltr", dir);
String disabled = inputElement.getAttribute(HTML.ATTR_DISABLED);
assertNotNull(disabled);
@@ -250,10 +250,8 @@
assertNotNull("Attribute style is not exist.", style);
assertEquals("font-size: large;", style);
- String disabled = select.getAttribute(HTML.ATTR_DISABLED);
- assertNotNull("Attribute disabled is not exist.", disabled);
- assertEquals("disabled", disabled);
+
elements.clear();
// find "option" elements
@@ -266,10 +264,12 @@
nsIDOMElement inputElement = (nsIDOMElement) elements.get(i)
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
assertNotNull(inputElement);
+
String attr = inputElement.getAttribute(HTML.ATTR_CLASS);
assertNotNull("Attribute class is not exist in option tag", attr);
assertEquals("myStyle", attr);
+
}
if (getException() != null) {
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE788Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE788Test.java 2008-04-03 15:58:15 UTC (rev 7305)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE788Test.java 2008-04-03 15:58:18 UTC (rev 7306)
@@ -71,7 +71,7 @@
//Tests CA
baseCheckofCA(CA_NAME, "JBIDE/788/testCAPathProposals.xhtml", 514, 3);
- baseCheckofCA(CA_NAME, "JBIDE/788/testCAPathProposals.xhtml", 586, 4);
+ baseCheckofCA(CA_NAME, "JBIDE/788/testCAPathProposals.xhtml", 586, 5);
baseCheckofCA(CA_NAME, "JBIDE/788/testCAPathProposals.xhtml", 653, 46);
baseCheckofCA(CA_NAME, "JBIDE/788/testCAPathProposals.xhtml", 719, 46);
// check exception
17 years, 8 months
JBoss Tools SVN: r7305 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-04-03 11:58:15 -0400 (Thu, 03 Apr 2008)
New Revision: 7305
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
Log:
Fix facelet JUnit tests
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-04-03 15:55:16 UTC (rev 7304)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-04-03 15:58:15 UTC (rev 7305)
@@ -23,7 +23,6 @@
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
-import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.interfaces.nsIDOMText;
/**
@@ -34,8 +33,14 @@
*/
public class FaceletsComponentTest extends VpeTest {
+ private static final String PAGE_HEADER = "Page Header"; //$NON-NLS-1$
+ private static final String USER = "#{user}"; //$NON-NLS-1$
+ private static final String COMPONENT_S_CONTENT_IS_NOT_SHOWN = "Component's content is not shown"; //$NON-NLS-1$
+ private static final String TEMPLATE_WITH_RELATED_PATH_IS_NOT_INCLUDED = "Template with related path is not included"; //$NON-NLS-1$
+ private static final String TEMPLATE_WITH_ABSOLUTE_PATH_IS_NOT_INCLUDED = "Template with absolute path is not included"; //$NON-NLS-1$
+ private static final String DEFINED_CONTENT_IS_NOT_SHOWN = "Defined content is not shown"; //$NON-NLS-1$
// import project name
- public static final String IMPORT_PROJECT_NAME = "faceletsTest";
+ public static final String IMPORT_PROJECT_NAME = "faceletsTest"; //$NON-NLS-1$
public FaceletsComponentTest(String name) {
super(name);
@@ -48,33 +53,25 @@
* @throws Throwable
*/
public void testDebug() throws Throwable {
- nsIDOMElement element = performTestForFaceletComponent("components/debug.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/debug.xhtml"); //$NON-NLS-1$
nsIDOMNode node = (nsIDOMNode) element
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
// find "div" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_DIV);
- assertEquals(1, elements.size());
- nsIDOMElement divElement = (nsIDOMElement) elements.get(0)
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ TestUtil.findAllElementsByName(node, elements, HTML.TAG_DIV);
+ assertEquals(5, elements.size());
- nsIDOMElement divBody = (nsIDOMElement) divElement.getLastChild()
+ nsIDOMElement divElement = (nsIDOMElement) elements.get(4)
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement divParent = (nsIDOMElement) divBody.getLastChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMText text = (nsIDOMText) divElement.getFirstChild()
+ .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
- nsIDOMElement div = (nsIDOMElement) divParent.getFirstChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ assertEquals("Debug's content is not shown", text.getNodeValue(), //$NON-NLS-1$
+ "Ctrl+Shift+"); //$NON-NLS-1$
- nsIDOMText text = (nsIDOMText) div.getFirstChild().queryInterface(
- nsIDOMText.NS_IDOMTEXT_IID);
-
- assertEquals("Debug's content is not shown", text.getNodeValue(),
- "Ctrl+Shift+");
-
if (getException() != null) {
throw getException();
}
@@ -87,21 +84,22 @@
*/
public void testDefine() throws Throwable {
- nsIDOMElement element = performTestForFaceletComponent("components/define.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/define.xhtml"); //$NON-NLS-1$
nsIDOMNode node = (nsIDOMNode) element
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
// find "span" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_SPAN);
+ TestUtil.findAllElementsByName(node, elements, HTML.TAG_SPAN);
- assertEquals(3, elements.size());
- nsIDOMElement elementSpan0 = (nsIDOMElement) elements.get(0)
+ assertEquals(39, elements.size());
+
+ nsIDOMElement elementSpan0 = (nsIDOMElement) elements.get(12)
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement elementSpan1 = (nsIDOMElement) elements.get(1)
+ nsIDOMElement elementSpan1 = (nsIDOMElement) elements.get(17)
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement elementSpan2 = (nsIDOMElement) elements.get(2)
+ nsIDOMElement elementSpan2 = (nsIDOMElement) elements.get(25)
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
nsIDOMText text0 = (nsIDOMText) elementSpan0.getFirstChild()
@@ -111,12 +109,11 @@
nsIDOMText text2 = (nsIDOMText) elementSpan2.getFirstChild()
.queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
- assertEquals("Defined content is not shown", text0.getNodeValue(),
- "Greeting Page");
- assertEquals("Defined content is not shown", text1.getNodeValue(),
- "#{user}");
- assertEquals("Defined content is not shown", text2.getNodeValue(),
- "#{person.name}!");
+ assertEquals(DEFINED_CONTENT_IS_NOT_SHOWN, text0.getNodeValue(),
+ "Greeting Page"); //$NON-NLS-1$
+ assertEquals(DEFINED_CONTENT_IS_NOT_SHOWN, text1.getNodeValue(), USER);
+ assertEquals(DEFINED_CONTENT_IS_NOT_SHOWN, text2.getNodeValue(),
+ "#{person.name}!"); //$NON-NLS-1$
if (getException() != null) {
throw getException();
@@ -131,16 +128,16 @@
public void testComposition() throws Throwable {
// check absolute path
- nsIDOMElement element = performTestForFaceletComponent("components/composition_absolute.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/composition_absolute.xhtml"); //$NON-NLS-1$
- checkTemplatePage(element, "Page Header",
- "Template with absolute path is not included");
+ checkTemplatePage(element, PAGE_HEADER,
+ TEMPLATE_WITH_ABSOLUTE_PATH_IS_NOT_INCLUDED);
// check related path
- element = performTestForFaceletComponent("components/composition_related.xhtml");
+ element = performTestForFaceletComponent("components/composition_related.xhtml"); //$NON-NLS-1$
- checkTemplatePage(element, "Page Header",
- "Template with related path is not included");
+ checkTemplatePage(element, PAGE_HEADER,
+ TEMPLATE_WITH_RELATED_PATH_IS_NOT_INCLUDED);
if (getException() != null) {
throw getException();
@@ -154,28 +151,24 @@
*/
public void testComponent() throws Throwable {
- nsIDOMElement element = performTestForFaceletComponent("components/component.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/component.xhtml"); //$NON-NLS-1$
nsIDOMNode node = (nsIDOMNode) element
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
// find "div" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_DIV);
- assertEquals(1, elements.size());
- nsIDOMElement divElement = (nsIDOMElement) elements.get(0)
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ TestUtil.findAllElementsByName(node, elements, HTML.TAG_DIV);
- nsIDOMElement divBody = (nsIDOMElement) divElement.getLastChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ assertEquals(4, elements.size());
- nsIDOMElement div = (nsIDOMElement) divBody.getLastChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement div = (nsIDOMElement) elements.get(3).queryInterface(
+ nsIDOMElement.NS_IDOMELEMENT_IID);
- String title = div.getAttribute("title");
+ String title = div.getAttribute("title"); //$NON-NLS-1$
- assertEquals("Component's content is not shown", title.replaceAll(
- "\\s+", ""), "ui:componentbinding:#{backingBean.menu}");
+ assertEquals(COMPONENT_S_CONTENT_IS_NOT_SHOWN, title.replaceAll("\\s+", //$NON-NLS-1$
+ ""), "ui:componentbinding:#{backingBean.menu}"); //$NON-NLS-1$ //$NON-NLS-2$
if (getException() != null) {
throw getException();
}
@@ -187,7 +180,7 @@
* @throws Throwable
*/
public void testRemove() throws Throwable {
- nsIDOMElement element = performTestForFaceletComponent("components/remove.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/remove.xhtml"); //$NON-NLS-1$
nsIDOMNode node = (nsIDOMNode) element
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
@@ -196,17 +189,19 @@
// find "span" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_SPAN);
- assertEquals(1, elements.size());
+ for (int i = 0; i < elements.size(); i++) {
- nsIDOMElement elementSpan = (nsIDOMElement) elements.get(0)
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement elementSpan = (nsIDOMElement) elements.get(i)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMText text = (nsIDOMText) elementSpan.getFirstChild()
- .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
-
- assertEquals("Content inside ui:remove tag shouldn't be shown", false,
- text.getNodeValue().equals("\nThis will be removed.\n"));
-
+ nsIDOMText text = (nsIDOMText) elementSpan.getFirstChild()
+ .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
+ if (text == null)
+ continue;
+ assertEquals(
+ "Content inside ui:remove tag shouldn't be shown", false, //$NON-NLS-1$
+ text.getNodeValue().equals("\nThis will be removed.\n")); //$NON-NLS-1$
+ }
if (getException() != null) {
throw getException();
}
@@ -219,16 +214,16 @@
*/
public void testDecorate() throws Throwable {
// check absolute path
- nsIDOMElement element = performTestForFaceletComponent("components/decorate_absolute.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/decorate_absolute.xhtml"); //$NON-NLS-1$
- checkTemplatePage(element, "Page Header",
- "Template with absolute path is not included");
+ checkTemplatePage(element, PAGE_HEADER,
+ TEMPLATE_WITH_ABSOLUTE_PATH_IS_NOT_INCLUDED);
// check related path
- element = performTestForFaceletComponent("components/decorate_related.xhtml");
+ element = performTestForFaceletComponent("components/decorate_related.xhtml"); //$NON-NLS-1$
- checkTemplatePage(element, "Page Header",
- "Template with related path is not included");
+ checkTemplatePage(element, PAGE_HEADER,
+ TEMPLATE_WITH_RELATED_PATH_IS_NOT_INCLUDED);
if (getException() != null) {
throw getException();
@@ -241,7 +236,7 @@
* @throws Throwable
*/
public void testRepeat() throws Throwable {
- nsIDOMElement element = performTestForFaceletComponent("components/repeat.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/repeat.xhtml"); //$NON-NLS-1$
nsIDOMNode node = (nsIDOMNode) element
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
@@ -255,12 +250,12 @@
nsIDOMElement elementDL = (nsIDOMElement) elements.get(0)
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement elementDT = (nsIDOMElement) elementDL.getFirstChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ elements.clear();
- assertEquals("Component's content is not shown", HTML.TAG_DT, elementDT
- .getNodeName().toUpperCase());
+ TestUtil.findAllElementsByName(elementDL, elements, HTML.TAG_DT);
+ assertEquals(1, elements.size());
+
if (getException() != null) {
throw getException();
}
@@ -273,16 +268,16 @@
*/
public void testInclude() throws Throwable {
// check absolute path
- nsIDOMElement element = performTestForFaceletComponent("components/include_absolute.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/include_absolute.xhtml"); //$NON-NLS-1$
- checkTemplatePage(element, "Page Header",
- "Template with absolute path is not included");
+ checkTemplatePage(element, PAGE_HEADER,
+ TEMPLATE_WITH_ABSOLUTE_PATH_IS_NOT_INCLUDED);
// check related path
- element = performTestForFaceletComponent("components/include_related.xhtml");
+ element = performTestForFaceletComponent("components/include_related.xhtml"); //$NON-NLS-1$
- checkTemplatePage(element, "Page Header",
- "Template with related path is not included");
+ checkTemplatePage(element, PAGE_HEADER,
+ TEMPLATE_WITH_RELATED_PATH_IS_NOT_INCLUDED);
if (getException() != null) {
throw getException();
@@ -295,28 +290,23 @@
* @throws Throwable
*/
public void testFragment() throws Throwable {
- nsIDOMElement element = performTestForFaceletComponent("components/fragment.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/fragment.xhtml"); //$NON-NLS-1$
nsIDOMNode node = (nsIDOMNode) element
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
// find "div" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_DIV);
- assertEquals(1, elements.size());
- nsIDOMElement divElement = (nsIDOMElement) elements.get(0)
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ TestUtil.findAllElementsByName(node, elements, HTML.TAG_DIV);
+ assertEquals(4, elements.size());
- nsIDOMElement divBody = (nsIDOMElement) divElement.getLastChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement div = (nsIDOMElement) elements.get(3).queryInterface(
+ nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement div = (nsIDOMElement) divBody.getLastChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ String title = div.getAttribute("title"); //$NON-NLS-1$
- String title = div.getAttribute("title");
-
- assertEquals("Fragment's content is not shown", title.replaceAll(
- "\\s+", ""), "ui:fragmentbinding:#{uiCache['searchResult']}");
+ assertEquals("Fragment's content is not shown", title.replaceAll( //$NON-NLS-1$
+ "\\s+", ""), "ui:fragmentbinding:#{uiCache['searchResult']}"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
if (getException() != null) {
throw getException();
}
@@ -329,7 +319,7 @@
*/
public void testInsert() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/insert.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/insert.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
/**
@@ -348,12 +338,12 @@
IFile file = (IFile) TestUtil.getComponentPath(componentPage,
IMPORT_PROJECT_NAME);
- assertNotNull("Could not open specified file " + file.getFullPath(),
+ assertNotNull("Could not open specified file " + file.getFullPath(), //$NON-NLS-1$
file);
IEditorInput input = new FileEditorInput(file);
- assertNotNull("Editor input is null", input);
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
// open and get editor
JSPMultiPageEditor part = openEditor(input);
@@ -374,40 +364,26 @@
*/
public void testParam() throws Throwable {
// check absolute path
- nsIDOMElement element = performTestForFaceletComponent("components/param.xhtml");
+ nsIDOMElement element = performTestForFaceletComponent("components/param.xhtml"); //$NON-NLS-1$
nsIDOMNode node = (nsIDOMNode) element
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
- // find "table" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals("Component's content is not shown", 1, elements.size());
-
- nsIDOMElement table = (nsIDOMElement) elements.get(0).queryInterface(
+ // find "td" elements
+ TestUtil.findAllElementsByName(node, elements, HTML.TAG_TD);
+ assertEquals(5, elements.size());
+ nsIDOMElement td = (nsIDOMElement) elements.get(1).queryInterface(
nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement tbody = (nsIDOMElement) table.getFirstChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- nsIDOMNodeList list = tbody.getChildNodes();
-
- assertEquals("Component's content is not shown", 4, list.getLength());
-
- nsIDOMElement tr = (nsIDOMElement) list.item(1).queryInterface(
- nsIDOMElement.NS_IDOMELEMENT_IID);
-
- nsIDOMElement td = (nsIDOMElement) tr.getFirstChild().queryInterface(
- nsIDOMElement.NS_IDOMELEMENT_IID);
nsIDOMElement span = (nsIDOMElement) td.getFirstChild().queryInterface(
nsIDOMElement.NS_IDOMELEMENT_IID);
nsIDOMText text = (nsIDOMText) span.getFirstChild().queryInterface(
nsIDOMText.NS_IDOMTEXT_IID);
- assertEquals("Component's content is not shown", text.getNodeValue(),
- "#{user}");
+ assertEquals(COMPONENT_S_CONTENT_IS_NOT_SHOWN, text.getNodeValue(),
+ USER);
if (getException() != null) {
throw getException();
@@ -421,19 +397,11 @@
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
- // find "table" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals(message, 1, elements.size());
-
- nsIDOMElement table = (nsIDOMElement) elements.get(0).queryInterface(
+ // find "td" elements
+ TestUtil.findAllElementsByName(node, elements, HTML.TAG_TD);
+ assertEquals(message, 5, elements.size());
+ nsIDOMElement td = (nsIDOMElement) elements.get(0).queryInterface(
nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement tbody = (nsIDOMElement) table.getFirstChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement tr = (nsIDOMElement) tbody.getFirstChild()
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- nsIDOMElement td = (nsIDOMElement) tr.getFirstChild().queryInterface(
- nsIDOMElement.NS_IDOMELEMENT_IID);
nsIDOMElement div = (nsIDOMElement) td.getFirstChild().queryInterface(
nsIDOMElement.NS_IDOMELEMENT_IID);
nsIDOMElement span = (nsIDOMElement) div.getFirstChild()
@@ -452,7 +420,7 @@
*/
public void testAllTags() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/faceletsTest.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/faceletsTest.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
}
17 years, 8 months
JBoss Tools SVN: r7304 - trunk/documentation/jboss-tools-docs.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-04-03 11:55:16 -0400 (Thu, 03 Apr 2008)
New Revision: 7304
Modified:
trunk/documentation/jboss-tools-docs/index.html
Log:
http://jira.jboss.com/jira/browse/JBDS-250
the page is updated according to changes in guides names
Modified: trunk/documentation/jboss-tools-docs/index.html
===================================================================
--- trunk/documentation/jboss-tools-docs/index.html 2008-04-03 15:54:01 UTC (rev 7303)
+++ trunk/documentation/jboss-tools-docs/index.html 2008-04-03 15:55:16 UTC (rev 7304)
@@ -7,25 +7,29 @@
<body>
- <h1>JBoss Tools Guides - Latest Version (nightly build):</h1>
+ <h1>JBoss Tools Guides - Latest Version:</h1>
<ul class="linkage">
-<li>Getting Started with JBoss Developer Studio Guide <a href="GettingStartedGuide/en/html/index.html">(html)</a> <a href="GettingStartedGuide/en/html_single/index.html">(html single)</a> <a href="GettingStartedGuide/en/pdf/Getting_Started_with_JBDS.pdf">(pdf)</a></li>
+ <li>Getting Started with JBoss Developer Studio Guide <a href="target/en.dir/GettingStartedGuide/html/index.html">(html)</a> <a href="target/en.dir/GettingStartedGuide/html_single/index.html">(html single)</a> <a href="target/en.dir/GettingStartedGuide/pdf/Getting_Started_Guide_(en-US).pdf">(pdf)</a></li>
-<li>Seam Dev Tools Reference Guide<a href="seam/en/html/index.html">(html)</a> <a href="seam/en/html_single/index.html">(html single)</a> <a href="seam/en/pdf/seam_Dev_Tools_Reference_Guide.pdf">(pdf)</a></li>
+ <li>Seam Dev Tools Reference Guide<a href="target/en.dir/seam/html/index.html">(html)</a> <a href="target/en.dir/seam/html_single/index.html">(html single)</a> <a href="target/en.dir/seam/pdf/Seam_Reference_Guide_(en-US).pdf">(pdf)</a></li>
-<li>Visual Web Tools Reference Guide <a href="jsf/en/html/index.html">(html)</a> <a href="jsf/en/html_single/index.html">(html single)</a> <a href="jsf/en/pdf/Visual_Web_Tools_Reference_Guide.pdf">(pdf)</a></li>
+ <li>Visual Web Tools Reference Guide <a href="target/en.dir/jsf/html/index.html">(html)</a> <a href="target/en.dir/jsf/html_single/index.html">(html single)</a> <a href="target/en.dir/jsf/pdf/Visual_Web_Tools_Reference_Guide_(en-US).pdf">(pdf)</a></li>
-<li>JBoss Server Manager Reference Guide<a href="as/en/html/index.html">(html)</a> <a href="as/en/html_single/index.html">(html single)</a> <a href="as/en/pdf/server_manager_guide.pdf">(pdf)</a></li>
+ <li>JBoss Server Manager Reference Guide<a href="target/en.dir/as/html/index.html">(html)</a> <a href="target/en.dir/as/html_single/index.html">(html single)</a> <a href="target/en.dir/as/pdf/AS_Reference_Guide_(en-US).pdf">(pdf)</a></li>
-<li>jBPM Tools Reference Guide<a href="jbpm/en/html/index.html">(html)</a> <a href="jbpm/en/html_single/index.html">(html single)</a> <a href="jbpm/en/pdf/jBPM_Tools_Ref.pdf">(pdf)</a></li>
+ <li>jBPM Tools Reference Guide<a href="target/en.dir/jbpm/html/index.html">(html)</a> <a href="target/en.dir/jbpm/html_single/index.html">(html single)</a> <a href="target/en.dir/jbpm/pdf/jBPM_Reference_Guide_(en-US).pdf">(pdf)</a></li>
-<li>Hibernate Tools Reference Guide<a href="hibernatetools/en/html/index.html">(html)</a> <a href="hibernatetools/en/html_single/index.html">(html single)</a> <a href="hibernatetools/en/pdf/hibernate_tools.pdf">(pdf)</a></li>
+ <li>Hibernate Tools Reference Guide<a href="target/en.dir/hibernatetools/html/index.html">(html)</a> <a href="target/en.dir/hibernatetools/html_single/index.html">(html single)</a> <a href="target/en.dir/hibernatetools/pdf/Hibernatetools_Reference_Guide_(en-US).pdf">(pdf)</a></li>
-<li>Legacy-jsf-struts guide<a href="legacy-jsf-struts/en/html/index.html">(html)</a> <a href="legacy-jsf-struts/en/html_single/index.html">(html single)</a> <a href="legacy-jsf-struts/en/pdf/legacy-jsf-struts.pdf">(pdf)</a></li>
+ <li>JSF Tools Reference Guide<a href="target/en.dir/jsf_tools_ref_guide/html/index.html">(html)</a> <a href="target/en.dir/jsf_tools_ref_guide/html_single/index.html">(html single)</a> <a href="target/en.dir/jsf_tools_ref_guide/pdf/JSF_Tools_Reference_Guide_(en-US).pdf">(pdf)</a></li>
+ <li>JSF Tools Tutorial<a href="target/en.dir/jsf_tools_tutorial/html/index.html">(html)</a> <a href="target/en.dir/jsf_tools_tutorial/html_single/index.html">(html single)</a> <a href="target/en.dir/jsf_tools_tutorial/pdf/JSF_Tools_Tutorial_(en-US).pdf">(pdf)</a></li>
-<li>Exadel Studio Migration Guide <a href="Exadel-migration/en/html/index.html">(html)</a> <a href="Exadel-migration/en/html_single/index.html">(html single)</a> <a href="Exadel-migration/en/pdf/exadel-migration.pdf">(pdf)</a></li>
+ <li>Struts Tools Reference Guide<a href="target/en.dir/struts_tools_ref_guide/html/index.html">(html)</a> <a href="target/en.dir/struts_tools_ref_guide/html_single/index.html">(html single)</a> <a href="target/en.dir/Struts_tools_ref_guide/pdf/Struts_Tools_Reference_Guide_(en-US).pdf">(pdf)</a></li>
+ <li>Struts Tools Tutorial<a href="target/en.dir/struts_tools_tutorial/html/index.html">(html)</a> <a href="target/en.dir/struts_tools_tutorial/html_single/index.html">(html single)</a> <a href="target/en.dir/struts_tools_tutorial/pdf/Struts_Tools_Tutorial_(en-US).pdf">(pdf)</a></li>
+
+ <li>Exadel Studio Migration Guide <a href="target/en.dir/Exadel-migration/html/index.html">(html)</a> <a href="target/en.dir/Exadel-migration/html_single/index.html">(html single)</a> <a href="target/en.dir/Exadel-migration/pdf/Exadel_Studio_Migration_Guide_(en-US).pdf">(pdf)</a></li>
</ul>
17 years, 8 months
JBoss Tools SVN: r7303 - trunk/seam/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-04-03 11:54:01 -0400 (Thu, 03 Apr 2008)
New Revision: 7303
Modified:
trunk/seam/docs/reference/en/master.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-292 guide version update according JBoosTools 2.0.1GA release
Modified: trunk/seam/docs/reference/en/master.xml
===================================================================
--- trunk/seam/docs/reference/en/master.xml 2008-04-03 15:44:55 UTC (rev 7302)
+++ trunk/seam/docs/reference/en/master.xml 2008-04-03 15:54:01 UTC (rev 7303)
@@ -11,6 +11,8 @@
<!ENTITY seam_editors SYSTEM "modules/seam_editors.xml">
<!ENTITY seam_view SYSTEM "modules/seam_view.xml">
+<!--<!ENTITY seam_preferences SYSTEM "modules/seam_preferences.xml">-->
+
<!ENTITY crud_database_application SYSTEM "modules/crud_database_application.xml">
<!ENTITY crud_application_walkthrough SYSTEM "modules/crud_application_walkthrough.xml">
<!ENTITY business_application SYSTEM "modules/business_application.xml">
@@ -26,7 +28,7 @@
<holder>Red Hat</holder>
</copyright>
<releaseinfo>
-<para>Version: 2.0.0.GA</para>
+<para>Version: 2.0.1.GA</para>
</releaseinfo>
</bookinfo>
@@ -40,6 +42,7 @@
&generate_entities;
&seam_editors;
&seam_view;
+ <!-- &seam_preferences; -->
&crud_database_application;
&crud_application_walkthrough;
&testng;
17 years, 8 months
JBoss Tools SVN: r7302 - in trunk/seam/plugins: org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-04-03 11:44:55 -0400 (Thu, 03 Apr 2008)
New Revision: 7302
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamProjectChange.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1003 Fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamProjectChange.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamProjectChange.java 2008-04-03 15:33:03 UTC (rev 7301)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamProjectChange.java 2008-04-03 15:44:55 UTC (rev 7302)
@@ -29,14 +29,14 @@
protected IProject project;
- protected static String[] PROJECT_NAME_PROPERTIES = {
+ public final static String[] PROJECT_NAME_PROPERTIES = {
ISeamFacetDataModelProperties.SEAM_PARENT_PROJECT,
ISeamFacetDataModelProperties.SEAM_EAR_PROJECT,
ISeamFacetDataModelProperties.SEAM_EJB_PROJECT,
ISeamFacetDataModelProperties.SEAM_TEST_PROJECT
};
- protected static String[] FOLDER_PROPERTIES = {
+ public final static String[] FOLDER_PROPERTIES = {
ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER,
ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER,
ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER,
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-04-03 15:33:03 UTC (rev 7301)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-04-03 15:44:55 UTC (rev 7302)
@@ -19,6 +19,7 @@
import java.util.List;
import java.util.Map;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -344,7 +345,7 @@
}
if(folder==null) {
SeamProjectsSet set = new SeamProjectsSet(project);
- IFolder f = set.getModelFolder();
+ IContainer f = set.getModelFolder();
folder = f!=null?f.getFullPath().toString():"";
}
return folder;
@@ -357,7 +358,7 @@
}
if(folder==null) {
SeamProjectsSet set = new SeamProjectsSet(project);
- IFolder f = set.getActionFolder();
+ IContainer f = set.getActionFolder();
folder = f!=null?f.getFullPath().toString():"";
}
return folder;
@@ -370,7 +371,7 @@
}
if(folder==null) {
SeamProjectsSet set = new SeamProjectsSet(project);
- IFolder f = set.getTestsFolder();
+ IContainer f = set.getTestsFolder();
folder = f!=null?f.getFullPath().toString():"";
}
return folder;
@@ -383,7 +384,7 @@
}
if(folder==null) {
SeamProjectsSet set = new SeamProjectsSet(project);
- IFolder f = set.getViewsFolder();
+ IContainer f = set.getViewsFolder();
folder = f!=null?f.getFullPath().toString():"";
}
return folder;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-04-03 15:33:03 UTC (rev 7301)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-04-03 15:44:55 UTC (rev 7302)
@@ -22,9 +22,10 @@
import org.apache.tools.ant.util.FileUtils;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
@@ -62,6 +63,30 @@
super(label);
}
+ private void putResourceLocationProperty(Map<String, Object> vars, String parameterName, IResource resource) {
+ if(resource!=null) {
+ vars.put(parameterName, resource.getLocation().toFile().toString());
+ } else {
+ vars.put(parameterName, "");
+ }
+ }
+
+ private void putResourceLocationProperty(Map<String, Object> vars, String parameterName, String resourcePath) {
+ if(resourcePath!=null) {
+ vars.put(parameterName, resourcePath);
+ } else {
+ vars.put(parameterName, "");
+ }
+ }
+
+ private void putPackageLocationProperty(Map<String, Object> vars, String parameterName, String packageName) {
+ if(packageName!=null) {
+ vars.put(parameterName, packageName.replace('.','/'));
+ } else {
+ vars.put(parameterName, "");
+ }
+ }
+
/**
* @see AbstractOperation#execute(IProgressMonitor, IAdaptable)
*/
@@ -93,22 +118,23 @@
String entityFolder = getEntityBeanPackageName(seamFacetPrefs, params);
String testFolder = getTestCasesPackageName(seamFacetPrefs, params);
- vars.put(IParameter.SEAM_PROJECT_INSTANCE,project);
+ vars.put(IParameter.SEAM_PROJECT_INSTANCE, project);
vars.put(IParameter.JBOSS_SEAM_HOME, SeamRuntimeManager.getInstance().getRuntimeForProject(project).getHomeDir());
- vars.put(IParameter.SEAM_PROJECT_LOCATION_PATH,project.getLocation().toFile().toString());
- vars.put(IParameter.SEAM_PROJECT_WEBCONTENT_PATH,seamPrjSet.getViewsFolder().getLocation().toFile().toString());
- vars.put(IParameter.SEAM_PROJECT_SRC_ACTION,seamPrjSet.getActionFolder().getLocation().toFile().toString());
- vars.put(IParameter.SEAM_PROJECT_SRC_MODEL,seamPrjSet.getModelFolder().getLocation().toFile().toString());
- vars.put(IParameter.SEAM_EJB_PROJECT_LOCATION_PATH,seamPrjSet.getEjbProject()!=null?seamPrjSet.getEjbProject().getLocation().toFile().toString():"");
- vars.put(IParameter.SEAM_TEST_PROJECT_LOCATION_PATH,seamPrjSet.getTestProject().getLocation().toFile().toString());
- vars.put(IParameter.TEST_SOURCE_FOLDER,seamPrjSet.getTestsFolder().getLocation().toFile().toString());
- vars.put(IParameter.SESSION_BEAN_PACKAGE_PATH, actionFolder.replace('.','/'));
- vars.put(IParameter.SESSION_BEAN_PACKAGE_NAME, actionFolder);
- vars.put(IParameter.TEST_CASES_PACKAGE_PATH, testFolder.replace('.','/'));
- vars.put(IParameter.TEST_CASES_PACKAGE_NAME, testFolder);
- vars.put(IParameter.ENTITY_BEAN_PACKAGE_PATH, entityFolder.replace('.','/'));
- vars.put(IParameter.ENTITY_BEAN_PACKAGE_NAME, entityFolder);
+ putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_LOCATION_PATH, project);
+ putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_WEBCONTENT_PATH, seamPrjSet.getViewsFolder());
+ putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_SRC_ACTION, seamPrjSet.getActionFolder());
+ putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_SRC_MODEL, seamPrjSet.getModelFolder());
+ putResourceLocationProperty(vars, IParameter.SEAM_EJB_PROJECT_LOCATION_PATH, seamPrjSet.getEjbProject());
+ putResourceLocationProperty(vars, IParameter.SEAM_TEST_PROJECT_LOCATION_PATH, seamPrjSet.getTestProject());
+ putResourceLocationProperty(vars, IParameter.TEST_SOURCE_FOLDER, seamPrjSet.getTestsFolder());
+ putPackageLocationProperty(vars, IParameter.SESSION_BEAN_PACKAGE_PATH, actionFolder);
+ putResourceLocationProperty(vars, IParameter.SESSION_BEAN_PACKAGE_NAME, actionFolder);
+ putPackageLocationProperty(vars, IParameter.TEST_CASES_PACKAGE_PATH, testFolder);
+ putResourceLocationProperty(vars, IParameter.TEST_CASES_PACKAGE_NAME, testFolder);
+ putPackageLocationProperty(vars, IParameter.ENTITY_BEAN_PACKAGE_PATH, entityFolder);
+ putResourceLocationProperty(vars, IParameter.ENTITY_BEAN_PACKAGE_NAME, entityFolder);
+
List<FileMapping> fileMapping = getFileMappings(vars);
List<String[]> fileMappingCopy = applyVariables(fileMapping,vars);
FilterSetCollection filters = getFilterSetCollection(vars);
@@ -152,7 +178,7 @@
// ComponentCore is used to handle case when user changes
// default WebContent folder to another one in
// Web Facet configuration page
- IFolder viewFolder = seamPrjSet.getViewsFolder();
+ IContainer viewFolder = seamPrjSet.getViewsFolder();
if(viewFolder!=null) {
IProject prj = seamPrjSet.getWarProject();
IVirtualComponent webComp = ComponentCore.createComponent(prj);
17 years, 8 months
JBoss Tools SVN: r7301 - trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-04-03 11:33:03 -0400 (Thu, 03 Apr 2008)
New Revision: 7301
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamXMLFormLayoutData.java
Log:
JBIDE-1749
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentFormLayoutData.java 2008-04-03 15:32:49 UTC (rev 7300)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentFormLayoutData.java 2008-04-03 15:33:03 UTC (rev 7301)
@@ -41,6 +41,23 @@
)
};
+ private final static IFormData[] SEAM_COMPONENT_20_DEFINITIONS = new IFormData[] {
+ new FormData(
+ SeamXMLUIMessages.getString("SEAM_COMPONENT_FORM_LAYOUT_DATA_SEAM_COMPONENT"), //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENT_20)
+ ),
+ SEAM_PROPERTY_LIST_DEFINITION,
+ new FormData(
+ SeamXMLUIMessages.getString("SEAM_COMPONENT_FORM_LAYOUT_DATA_ADVANCED"), //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ FormLayoutDataUtil.createAdvancedFormAttributeData(ENT_SEAM_COMPONENT_20)
+ )
+ };
+
+ final static IFormData SEAM_COMPONENT_20_FORM_DEFINITION = new FormData(
+ ENT_SEAM_COMPONENT_20, new String[]{null}, SEAM_COMPONENT_20_DEFINITIONS);
+
final static IFormData SEAM_COMPONENT_FORM_DEFINITION = new FormData(
ENT_SEAM_COMPONENT, new String[]{null}, SEAM_COMPONENT_DEFINITIONS);
@@ -62,13 +79,13 @@
new FormData(
SeamXMLUIMessages.getString("SEAM_COMPONENT_FORM_LAYOUT_DATA_SEAM_COMPONENT_2_0_FILE"), //$NON-NLS-1$
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
- FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENT_20)
+ FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENT_FILE_20)
),
SEAM_PROPERTY_LIST_DEFINITION,
new FormData(
SeamXMLUIMessages.getString("SEAM_COMPONENT_FORM_LAYOUT_DATA_ADVANCED"), //$NON-NLS-1$
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
- FormLayoutDataUtil.createAdvancedFormAttributeData(ENT_SEAM_COMPONENT_20)
+ FormLayoutDataUtil.createAdvancedFormAttributeData(ENT_SEAM_COMPONENT_FILE_20)
)
};
@@ -76,5 +93,5 @@
ENT_SEAM_COMPONENT_12, new String[]{null}, COMPONENT_FILE_12_DEFINITIONS);
final static IFormData SEAM_COMPONENT_FILE_20_FORM_DEFINITION = new FormData(
- ENT_SEAM_COMPONENT_20, new String[]{null}, COMPONENT_FILE_20_DEFINITIONS);
+ ENT_SEAM_COMPONENT_FILE_20, new String[]{null}, COMPONENT_FILE_20_DEFINITIONS);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2008-04-03 15:32:49 UTC (rev 7300)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2008-04-03 15:33:03 UTC (rev 7301)
@@ -23,6 +23,14 @@
FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent") //$NON-NLS-1$
);
+ static IFormData SEAM_COMPONENT_20_LIST_DEFINITION = new FormData(
+ "Components", //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new FormAttributeData("class", 60)}, //$NON-NLS-1$
+ new String[]{ENT_SEAM_COMPONENT_20},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent") //$NON-NLS-1$
+ );
+
static IFormData getFactoryList(String entity) {
return new FormData(
"Factories", //$NON-NLS-1$
@@ -79,7 +87,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_20)
),
- SEAM_COMPONENT_LIST_DEFINITION,
+ SEAM_COMPONENT_20_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY_20),
getEventList(ENT_SEAM_EVENT_20),
SEAM_IMPORT_LIST_DEFINITION
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamXMLFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamXMLFormLayoutData.java 2008-04-03 15:32:49 UTC (rev 7300)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamXMLFormLayoutData.java 2008-04-03 15:33:03 UTC (rev 7301)
@@ -28,6 +28,7 @@
SeamComponentFormLayoutData.SEAM_COMPONENT_FILE_FORM_DEFINITION,
SeamComponentFormLayoutData.SEAM_COMPONENT_FILE_20_FORM_DEFINITION,
SeamComponentFormLayoutData.SEAM_COMPONENT_FORM_DEFINITION,
+ SeamComponentFormLayoutData.SEAM_COMPONENT_20_FORM_DEFINITION,
SeamPropertyFormLayoutData.SEAM_PROPERTY_LIST_FORM_DEFINITION,
SeamPropertyFormLayoutData.SEAM_PROPERTY_MAP_FORM_DEFINITION,
SeamFactoryFormLayoutData.SEAM_FACTORY_FORM_DEFINITION,
17 years, 8 months