JBoss Tools SVN: r6302 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-02-13 11:46:26 -0500 (Wed, 13 Feb 2008)
New Revision: 6302
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-518
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java 2008-02-13 16:14:55 UTC (rev 6301)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java 2008-02-13 16:46:26 UTC (rev 6302)
@@ -43,10 +43,15 @@
*
*/
public class OpenSeamComponentDialog extends FilteredItemsSelectionDialog {
-
+ private static SeamComponentSelectionHistory history = null;
+
public OpenSeamComponentDialog(Shell shell) {
super(shell);
- setSelectionHistory(new SeamComponentSelectionHistory());
+
+ if(history == null)
+ history = new SeamComponentSelectionHistory();
+
+ setSelectionHistory(history);
setListLabelProvider(new SeamComponentLabelProvider());
setDetailsLabelProvider(new SeamComponentLabelProvider());
}
@@ -70,7 +75,7 @@
for(int i = 0; i < projects.length; i++){
IProject project = projects[i];
progressMonitor.subTask(project.getName());
- progressMonitor.worked(1);
+
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
if(seamProject != null){
Iterator<ISeamComponent> iter = seamProject.getComponents().iterator();
@@ -81,6 +86,7 @@
contentProvider.add(component, itemsFilter);
}
}
+ progressMonitor.worked(1);
}
progressMonitor.done();
}
@@ -173,7 +179,6 @@
}
protected Object restoreItemFromMemento(IMemento memento) {
- System.out.println("restoreItemFromMemento memento - "+memento.getClass());
XMLMemento mem = (XMLMemento)memento;
String projectName = mem.getString("ProjectName");
if(projectName == null) return null;
@@ -188,8 +193,6 @@
@Override
protected void storeItemToMemento(Object item, IMemento memento) {
-
- System.out.println("storeItemToMemento item - "+item.getClass()+" memento - "+memento.getClass());
SeamComponent component = (SeamComponent)item;
XMLMemento mem = (XMLMemento)memento;
mem.putString("ProjectName", component.getSeamProject().getProject().getName());
18 years, 2 months
JBoss Tools SVN: r6301 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-02-13 11:14:55 -0500 (Wed, 13 Feb 2008)
New Revision: 6301
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/TaglibSetXHTML.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1775
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/TaglibSetXHTML.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/TaglibSetXHTML.java 2008-02-13 14:47:57 UTC (rev 6300)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/TaglibSetXHTML.java 2008-02-13 16:14:55 UTC (rev 6301)
@@ -43,7 +43,11 @@
protected boolean doModifyBody(String body, String[] selected, StringBuffer sb) {
if(body == null || body.length() == 0) {
body = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" + "\n" +
- "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" +
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" +
+ "\t<body>\n" +
+ "\t\t<form action=\"\">\n" +
+ "\t\t</form>\n" +
+ "\t</body>\n" +
"</html>";
}
int ib = body.toLowerCase().indexOf("<html");
18 years, 2 months
JBoss Tools SVN: r6300 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-02-13 09:47:57 -0500 (Wed, 13 Feb 2008)
New Revision: 6300
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatHtmlContentAssistProcessor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1759 Fixed for 2.1
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatHtmlContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatHtmlContentAssistProcessor.java 2008-02-13 14:05:07 UTC (rev 6299)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatHtmlContentAssistProcessor.java 2008-02-13 14:47:57 UTC (rev 6300)
@@ -340,8 +340,10 @@
String matchString = contentAssistRequest.getMatchString();
if (matchString.length() > StringUtils.strip(text).length() &&
- ( (matchString.startsWith("\"") && matchString.endsWith("\""))
- || (matchString.startsWith("'") && matchString.endsWith("\"")))) {
+ ( (matchString.startsWith("\"") && matchString.endsWith("\"") &&
+ (matchString.indexOf("\"") != matchString.lastIndexOf("\"")))
+ || (matchString.startsWith("'") && matchString.endsWith("\"") &&
+ (matchString.indexOf("\"") != matchString.lastIndexOf("\""))))) {
return;
}
18 years, 2 months
JBoss Tools SVN: r6299 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-13 09:05:07 -0500 (Wed, 13 Feb 2008)
New Revision: 6299
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java
Log:
JBIDE-1778 Incremental modification of seam package structure is implemented
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2008-02-13 14:00:19 UTC (rev 6298)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2008-02-13 14:05:07 UTC (rev 6299)
@@ -22,12 +22,15 @@
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamComponentMethod;
+import org.jboss.tools.seam.core.ISeamElement;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamPackage;
import org.jboss.tools.seam.core.ISeamPropertiesDeclaration;
import org.jboss.tools.seam.core.ISeamProperty;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.ScopeType;
import org.jboss.tools.seam.core.SeamComponentMethodType;
+import org.jboss.tools.seam.core.event.Change;
/**
* @author Viacheslav Kabanovich
@@ -41,6 +44,9 @@
Set<ISeamXmlComponentDeclaration> xmlDeclarations = new HashSet<ISeamXmlComponentDeclaration>();
Set<ISeamPropertiesDeclaration> propertyDeclarations = new HashSet<ISeamPropertiesDeclaration>();
+ SeamPackage projectPackage = null;
+ SeamPackage scopePackage = null;
+
public SeamComponent () {
}
@@ -264,5 +270,89 @@
public SeamComponent clone() throws CloneNotSupportedException {
return this;
}
+
+ public void setProjectPackage(SeamPackage p) {
+ projectPackage = p;
+ }
+
+ public void setScopePackage(SeamPackage p) {
+ scopePackage = p;
+ }
+
+ public List<Change> removeFromModel(List<Change> changes) {
+ SeamScope pc = (SeamScope)getParent();
+ if(pc != null) {
+ pc.removeComponent(this);
+ changes = Change.addChange(changes, new Change(pc, null, this, null));
+ }
+ if(scopePackage != null) {
+ removeFrom(scopePackage);
+ changes = Change.addChange(changes, new Change(scopePackage, null, this, null));
+ scopePackage = null;
+ }
+ if(projectPackage != null) {
+ removeFrom(projectPackage);
+ changes = Change.addChange(changes, new Change(projectPackage, null, this, null));
+ projectPackage = null;
+ }
+
+ return changes;
+ }
+
+ public List<Change> revalidate(List<Change> changes) {
+ SeamScope pc = (SeamScope)getParent();
+ SeamScope pn = (SeamScope)getSeamProject().getScope(getScope());
+ if(pc != pn) {
+ if(pc != null) {
+ pc.removeComponent(this);
+ changes = Change.addChange(changes, new Change(pc, null, this, null));
+ }
+ setParent(pn);
+ pn.addComponent(this);
+ changes = Change.addChange(changes, new Change(pn, null, null, this));
+ if(scopePackage != null) {
+ removeFrom(scopePackage);
+ changes = Change.addChange(changes, new Change(scopePackage, null, this, null));
+ scopePackage = null;
+ }
+ }
+ if(scopePackage != null && !scopePackage.getQualifiedName().equals(SeamPackageUtil.getPackageName(this))) {
+ removeFrom(scopePackage);
+ changes = Change.addChange(changes, new Change(scopePackage, null, this, null));
+ scopePackage = null;
+ }
+ if(scopePackage == null) {
+ pn.validatePackage(this);
+ }
+ if(projectPackage != null && !projectPackage.getQualifiedName().equals(SeamPackageUtil.getPackageName(this))) {
+ removeFrom(projectPackage);
+ changes = Change.addChange(changes, new Change(projectPackage, null, this, null));
+ projectPackage = null;
+ }
+ if(projectPackage == null) {
+ ((SeamProject)getSeamProject()).validatePackage(this);
+ }
+ return changes;
+ }
+
+ private void removeFrom(ISeamPackage p) {
+ p.getComponents().remove(this);
+ while(p != null && p.getComponents().size() + p.getPackages().size() == 0) {
+ ISeamElement o = p.getParent();
+ if(o instanceof ISeamPackage) {
+ ISeamPackage q = (ISeamPackage)o;
+ q.getPackages().remove(p);
+ p = q;
+ } else if(o instanceof SeamScope) {
+ SeamScope s = (SeamScope)o;
+ s.removePackage(p);
+ p = null;
+ } else if(o instanceof SeamProject) {
+ SeamProject project = (SeamProject)o;
+ project.removePackage(p);
+ p = null;
+ }
+ }
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2008-02-13 14:00:19 UTC (rev 6298)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2008-02-13 14:05:07 UTC (rev 6299)
@@ -202,7 +202,7 @@
* @param scopeType
* @return
*/
- public ISeamScope getScope(ScopeType scopeType) {
+ public SeamScope getScope(ScopeType scopeType) {
return scopesMap.get(scopeType);
}
@@ -210,9 +210,17 @@
*
*/
public Collection<ISeamPackage> getPackages() {
- return packages.values();
+ synchronized(packages) {
+ return packages.values();
+ }
}
+ public void removePackage(ISeamPackage p) {
+ synchronized(packages) {
+ packages.remove(p.getName());
+ }
+ }
+
/**
*
*/
@@ -568,8 +576,6 @@
}
if(!sourcePaths.contains(source)) sourcePaths.add(source);
- revalidateLock++;
-
if(ds.getImports().size() > 0) {
setImports(source.toString(), ds.getImports());
} else {
@@ -578,6 +584,7 @@
Map<Object,ISeamComponentDeclaration> currentComponents = findComponentDeclarations(source);
+ Set<ISeamComponent> affectedComponents = new HashSet<ISeamComponent>();
List<Change> addedComponents = null;
for (int i = 0; i < components.length; i++) {
SeamComponentDeclaration loaded = (SeamComponentDeclaration)components[i];
@@ -592,6 +599,10 @@
SeamComponent c = getComponent(name);
+ if(c != null) {
+ affectedComponents.add(c);
+ }
+
String oldClassName = c == null ? null : c.getClassName();
if(current != null) {
@@ -610,6 +621,9 @@
loaded = current;
current = null;
c = getComponent(name);
+ if(c != null) {
+ affectedComponents.add(c);
+ }
} else {
if(loaded instanceof ISeamXmlComponentDeclaration) {
ISeamXmlComponentDeclaration xml = (ISeamXmlComponentDeclaration)loaded;
@@ -622,6 +636,7 @@
if(c == null && name != null) {
ScopeType scopeType = loaded.getScope();
c = newComponent(name, scopeType);
+ affectedComponents.add(c);
allComponents.put(name, c);
addVariable(c);
c.addDeclaration(loaded);
@@ -647,14 +662,19 @@
} else if(loaded instanceof ISeamXmlComponentDeclaration) {
ISeamXmlComponentDeclaration xml = (ISeamXmlComponentDeclaration)loaded;
onXMLLoadedDeclaration(c, oldClassName, xml);
- }
+ }
}
+
+ for (ISeamComponent c: affectedComponents) {
+ SeamComponent sc = (SeamComponent)c;
+ addedComponents = sc.revalidate(addedComponents);
+ }
+
fireChanges(addedComponents);
componentDeclarationsRemoved(currentComponents);
- revalidateLock--;
- revalidate();
+// revalidate();
Map<Object, ISeamFactory> currentFactories = findFactoryDeclarations(source);
List<Change> addedFactories = null;
@@ -751,6 +771,7 @@
c.addDeclaration(j);
changes = Change.addChange(changes, new Change(c, null, null, j));
}
+ if(changes != null) c.revalidate(changes);
fireChanges(changes);
}
@@ -762,7 +783,6 @@
if(!sourcePaths.contains(source)) return;
sourcePaths.remove(source);
removeImports(source.toString());
- revalidateLock++;
Iterator<SeamComponent> iterator = allComponents.values().iterator();
while(iterator.hasNext()) {
List<Change> changes = null;
@@ -794,8 +814,7 @@
it.remove();
}
}
- revalidateLock--;
- revalidate();
+// revalidate();
Iterator<ISeamFactory> factories = allFactories.iterator();
while(factories.hasNext()) {
@@ -879,10 +898,7 @@
private List<Change> removeEmptyComponent(SeamComponent c) {
List<Change> changes = null;
ISeamElement p = c.getParent();
- if(p instanceof SeamScope) {
- ((SeamScope)p).removeComponent(c);
- changes = Change.addChange(null, new Change(p, null, c, null));
- }
+ changes = c.removeFromModel(changes);
removeVariable(c);
changes = Change.addChange(changes, new Change(this, null, c, null));
return changes;
@@ -1314,47 +1330,42 @@
/**
*
*/
- int revalidateLock = 0;
-
- /**
- *
- */
void revalidate() {
- if(revalidateLock > 0) return;
- revalidateScopes();
- revalidatePackages();
+// if(revalidateLock > 0) return;
+// revalidateScopes();
+// revalidatePackages();
}
/**
*
*/
- void revalidateScopes() {
- List<Change> changes = null;
- for(SeamComponent c : allComponents.values()) {
- SeamScope pc = (SeamScope)c.getParent();
- SeamScope pn = (SeamScope)getScope(c.getScope());
- if(pc == pn) continue;
- c.setParent(pn);
- if(pc != null) {
- pc.removeComponent(c);
- changes = Change.addChange(changes, new Change(pc, null, c, null));
- }
- pn.addComponent(c);
- changes = Change.addChange(changes, new Change(pn, null, null, c));
- }
- for (int i = 0; i < scopes.length; i++) {
- scopes[i].revalidatePackages();
- }
- fireChanges(changes);
- }
+// void revalidateScopes() {
+// List<Change> changes = null;
+// for(SeamComponent c : allComponents.values()) {
+// SeamScope pc = (SeamScope)c.getParent();
+// SeamScope pn = getScope(c.getScope());
+// if(pc == pn) continue;
+// c.setParent(pn);
+// if(pc != null) {
+// pc.removeComponent(c);
+// changes = Change.addChange(changes, new Change(pc, null, c, null));
+// }
+// pn.addComponent(c);
+// changes = Change.addChange(changes, new Change(pn, null, null, c));
+// }
+// for (int i = 0; i < scopes.length; i++) {
+// scopes[i].revalidatePackages();
+// }
+// fireChanges(changes);
+// }
/**
*
*/
- void revalidatePackages() {
- List<Change> changes = SeamPackageUtil.revalidatePackages(this, allComponents, getComponents(), packages);
- fireChanges(changes);
- }
+// void revalidatePackages() {
+// List<Change> changes = SeamPackageUtil.revalidatePackages(this, allComponents, getComponents(), packages);
+// fireChanges(changes);
+// }
/**
*
@@ -1457,4 +1468,9 @@
}
}
+ public void validatePackage(SeamComponent c) {
+ SeamPackage p = (SeamPackage)SeamPackageUtil.findOrCreatePackage(this, packages, SeamPackageUtil.getPackageName(c));
+ c.setProjectPackage(p);
+ p.getComponents().add(c);
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java 2008-02-13 14:00:19 UTC (rev 6298)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java 2008-02-13 14:05:07 UTC (rev 6299)
@@ -42,7 +42,9 @@
}
public Collection<ISeamPackage> getPackages() {
- return packages.values();
+ synchronized(packages) {
+ return packages.values();
+ }
}
public Collection<ISeamPackage> getAllPackages() {
@@ -75,4 +77,15 @@
((SeamProject)getSeamProject()).fireChanges(changes);
}
+ public void validatePackage(SeamComponent c) {
+ SeamPackage p = (SeamPackage)SeamPackageUtil.findOrCreatePackage(this, packages, SeamPackageUtil.getPackageName(c));
+ c.setScopePackage(p);
+ p.getComponents().add(c);
+ }
+
+ public void removePackage(ISeamPackage p) {
+ synchronized(packages) {
+ packages.remove(p.getName());
+ }
+ }
}
18 years, 2 months
JBoss Tools SVN: r6298 - trunk/documentation/qa.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2008-02-13 09:00:19 -0500 (Wed, 13 Feb 2008)
New Revision: 6298
Added:
trunk/documentation/qa/JBossToolsTestcases.rar
Log:
Added a file remotely
Added: trunk/documentation/qa/JBossToolsTestcases.rar
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/qa/JBossToolsTestcases.rar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 2 months
JBoss Tools SVN: r6297 - trunk/documentation/qa.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2008-02-13 07:51:24 -0500 (Wed, 13 Feb 2008)
New Revision: 6297
Removed:
trunk/documentation/qa/RHDSsmoketests.doc
Log:
Removed file/folder
Deleted: trunk/documentation/qa/RHDSsmoketests.doc
===================================================================
(Binary files differ)
18 years, 2 months
JBoss Tools SVN: r6296 - trunk/documentation/qa.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2008-02-13 07:51:16 -0500 (Wed, 13 Feb 2008)
New Revision: 6296
Added:
trunk/documentation/qa/JBossDevStudioSmokeTests.doc
Log:
Added a file remotely
Added: trunk/documentation/qa/JBossDevStudioSmokeTests.doc
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/qa/JBossDevStudioSmokeTests.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 2 months
JBoss Tools SVN: r6295 - trunk/documentation/qa.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2008-02-13 07:38:31 -0500 (Wed, 13 Feb 2008)
New Revision: 6295
Added:
trunk/documentation/qa/JBossDevStudioTestcases.rar
Log:
Added a file remotely
Added: trunk/documentation/qa/JBossDevStudioTestcases.rar
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/qa/JBossDevStudioTestcases.rar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 2 months