JBoss Tools SVN: r2919 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-06 11:54:41 -0400 (Mon, 06 Aug 2007)
New Revision: 2919
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java
Log:
JBIDE-666
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2007-08-06 15:37:16 UTC (rev 2918)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2007-08-06 15:54:41 UTC (rev 2919)
@@ -13,259 +13,319 @@
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.util.FileUtil;
public class JarAccess {
- private String location = null;
- private String templocation = null;
- private ZipFile jar = null;
- private HashMap<String,HashSet<String>> map = new HashMap<String,HashSet<String>>();
- private long timeStamp = -1;
- private long size = -1;
+ private String location = null;
+ private String templocation = null;
- public JarAccess() {}
+ private ZipFile jar = null;
+ int jarLock = 0;
- public void setLocation(String location) {
- this.location = location;
- validate();
- }
-
- public String getLocation() {
- return location;
- }
+ private Map<String,HashSet<String>> map = new HashMap<String,HashSet<String>>();
+ private Map<String,Long> fileEntries = new HashMap<String,Long>();
- public boolean isLoaded() {
- return (jar != null || loading);
- }
+ private boolean loading = false;
+ private boolean exists = false;
+ private long timeStamp = -1;
+ private long size = -1;
+
+ public JarAccess() {}
+
+ public void setLocation(String location) {
+ this.location = location;
+ validate();
+ }
- private boolean loading = false;
+ public void lockJar() {
+ jarLock++;
+ }
- public void validate() {
- if (isLoaded()) return;
+ public String getLocation() {
+ return location;
+ }
+
+ public boolean isLoaded() {
+ return (exists || loading);
+ }
+
+ public void validate() {
+ if (isLoaded()) return;
loading = true;
templocation = null;
- try {
- File f = File.createTempFile("efs_", ".jar");
- f.deleteOnExit();
- int ind = location.indexOf(":/");
- if (ind != 1 && ind != -1) {
- InputStream i = new java.net.URL(location).openConnection().getInputStream();
- FileOutputStream o = new FileOutputStream(f);
- FileUtil.copy(i, o);
- timeStamp = -1;
- size = -1;
- } else {
- File nf = new File(location);
- FileUtil.copyFile(nf, f, true);
- timeStamp = nf.lastModified();
- size = nf.length();
- }
- templocation = f.getCanonicalPath();
- jar = new ZipFile(f);
- init();
- } catch (Exception e) {
- timeStamp = -1;
- size = -1;
- return;
- } finally {
+ try {
+ int ind = location.indexOf(":/");
+ if (ind != 1 && ind != -1) {
+ File f = File.createTempFile("efs_", ".jar");
+ f.deleteOnExit();
+ InputStream i = new java.net.URL(location).openConnection().getInputStream();
+ FileOutputStream o = new FileOutputStream(f);
+ FileUtil.copy(i, o);
+ timeStamp = -1;
+ size = -1;
+ templocation = f.getCanonicalPath();
+ } else {
+ File nf = new File(location);
+// FileUtil.copyFile(nf, f, true);
+ templocation = nf.getCanonicalPath();
+ timeStamp = nf.lastModified();
+ size = nf.length();
+ }
+ init();
+ exists = true;
+ } catch (Exception e) {
+ timeStamp = -1;
+ size = -1;
+ exists = false;
+ return;
+ } finally {
loading = false;
- }
- }
+ }
+ }
- private void init() {
- map.clear();
- map.put("", new HashSet<String>());
- Enumeration en = jar.entries();
- while(en.hasMoreElements()) {
- try {
- register(((ZipEntry)en.nextElement()).getName());
- } catch (Exception e) {
- //ignore
- }
- }
- }
+ private void init() throws Exception {
+ ZipFile jar = getZipFile();
+ map.clear();
+ fileEntries.clear();
+ map.put("", new HashSet<String>());
+ try {
+ if(jar == null) return;
+ Enumeration<?> en = jar.entries();
+ while(en.hasMoreElements()) {
+ try {
+ ZipEntry entry = (ZipEntry)en.nextElement();
+ String name = entry.getName();
+ if(name != null && !name.endsWith("/") && entry.getSize() > 0) {
+ fileEntries.put(name, new Long(entry.getSize()));
+ }
+ register(name);
+ } catch (Exception e) {
+ ModelPlugin.getPluginLog().logError(e);
+ }
+ }
+ } finally {
+ unlockJar();
+ }
+ }
- private void register(String path) {
- String[] parsed = parse(path);
- check(parsed[0]);
- HashSet<String> set = map.get(parsed[0]);
- if(!"/".equals(parsed[1])) set.add(parsed[1]);
- }
+ private ZipFile getZipFile() throws IOException {
+ synchronized (this) {
+ lockJar();
+ if(jar != null) return jar;
+ return jar = new ZipFile(templocation);
+ }
+ }
- private String[] parse(String path) {
- String q = path;
- if(path.endsWith("/")) q = q.substring(0, path.length() - 1);
- int i = q.lastIndexOf('/');
- String root = (i < 0) ? "" : path.substring(0, i);
- String name = (i < 0) ? path : path.substring(i + 1);
- return new String[]{root, name};
- }
+ public void unlockJar() {
+ jarLock--;
+ if(jarLock > 0 || jar == null) return;
+ synchronized (this) {
+ if(jar != null && jarLock == 0) {
+ try {
+ jar.close();
+ } catch (IOException e) {
+ //ignore
+ } finally {
+ jar = null;
+ }
+ }
+ }
+ }
- private void check(String path) {
- if(map.get(path) != null) return;
- map.put(path, new HashSet<String>());
- String[] parsed = parse(path);
- check(parsed[0]);
- if("".equals(parsed[1])) return;
- HashSet<String> set = map.get(parsed[0]);
- set.add(parsed[1] + "/");
- }
+ private void register(String path) {
+ String[] parsed = parse(path);
+ check(parsed[0]);
+ HashSet<String> set = map.get(parsed[0]);
+ if (!"/".equals(parsed[1]))
+ set.add(parsed[1]);
+ }
- public String[] getChildren(String path) {
- HashSet<String> set = map.get(path);
- return (set == null) ? new String[0] : set.toArray(new String[0]);
- }
+ private String[] parse(String path) {
+ String q = path;
+ if (path.endsWith("/"))
+ q = q.substring(0, path.length() - 1);
+ int i = q.lastIndexOf('/');
+ String root = (i < 0) ? "" : path.substring(0, i);
+ String name = (i < 0) ? path : path.substring(i + 1);
+ return new String[] { root, name };
+ }
- public long getSize(String path) {
- try {
- return jar.getEntry(path).getSize();
- } catch (Exception e) {
- return 0;
- }
- }
+ private void check(String path) {
+ if (map.get(path) != null)
+ return;
+ map.put(path, new HashSet<String>());
+ String[] parsed = parse(path);
+ check(parsed[0]);
+ if ("".equals(parsed[1]))
+ return;
+ HashSet<String> set = map.get(parsed[0]);
+ set.add(parsed[1] + "/");
+ }
- public String getContent(String path) {
- int size = 1024;
- byte b[] = new byte[size];
- StringBuffer sb = new StringBuffer();
- int length = 0;
- try {
- InputStream is = jar.getInputStream(jar.getEntry(path));
- BufferedInputStream bs = new BufferedInputStream(is);
- while((length = bs.available()) > 0) {
- if(length > size) length = size;
- length = bs.read(b, 0, length);
- if(length < 0) break;
- sb.append(new String(b, 0, length));
- }
- return sb.toString();
- } catch (Exception e) {
- return "";
- }
- }
+ public String[] getChildren(String path) {
+ HashSet<String> set = map.get(path);
+ return (set == null) ? new String[0] : set.toArray(new String[0]);
+ }
- public boolean isTextEntry(String path, int length) {
- String b = getContent(path);
- b = (b == null || b.length() < length) ? b : b.substring(length);
- return FileUtil.isText(b);
- }
+ public long getSize(String path) {
+ Long s = fileEntries.get(path);
+ return s == null ? 0 : s.longValue();
+ }
- boolean hasFolder(String path) {
- return map.get(path) != null;
- }
+ public String getContent(String path) {
+ int size = 1024;
+ byte b[] = new byte[size];
+ StringBuffer sb = new StringBuffer();
+ ZipFile jar = null;
+ try {
+ jar = getZipFile();
+ } catch (Exception e) {
+ unlockJar();
+ return "";
+ }
+ int length = 0;
+ try {
+ InputStream is = jar.getInputStream(jar.getEntry(path));
+ BufferedInputStream bs = new BufferedInputStream(is);
+ while ((length = bs.available()) > 0) {
+ if (length > size)
+ length = size;
+ length = bs.read(b, 0, length);
+ if (length < 0)
+ break;
+ sb.append(new String(b, 0, length));
+ }
+ return sb.toString();
+ } catch (Exception e) {
+ ModelPlugin.getPluginLog().logError(e);
+ return "";
+ } finally {
+ unlockJar();
+ }
+ }
- boolean hasFile(String path) {
- if(path == null) return false;
- int i = path.lastIndexOf('/');
- String p = (i < 0) ? "" : path.substring(0, i);
- String n = path.substring(i + 1);
- HashSet set = (HashSet)map.get(p);
- return set != null && set.contains(n);
- }
+ public boolean isTextEntry(String path, int length) {
+ String b = getContent(path);
+ b = (b == null || b.length() < length) ? b : b.substring(length);
+ return FileUtil.isText(b);
+ }
- public LFileObject getFileObject(String alias, String relpath) {
- return new LFileObjectJarImpl(this, alias, relpath);
- }
+ boolean hasFolder(String path) {
+ return map.get(path) != null;
+ }
- public boolean isModified() {
- if(timeStamp == -1) return true;
- try {
- File f = new File(location);
- return (timeStamp != f.lastModified() || size != f.length());
- } catch (Exception e) {
- return true;
- }
- }
+ boolean hasFile(String path) {
+ if (path == null)
+ return false;
+ int i = path.lastIndexOf('/');
+ String p = (i < 0) ? "" : path.substring(0, i);
+ String n = path.substring(i + 1);
+ Set<String> set = map.get(p);
+ return set != null && set.contains(n);
+ }
- public void invalidate() {
- if(jar != null) {
- try {
- jar.close();
- } catch (Exception e) {
- //ignore
- }
- }
- jar = null;
- map.clear();
- timeStamp = -1;
- size = -1;
- }
+ public LFileObject getFileObject(String alias, String relpath) {
+ return new LFileObjectJarImpl(this, alias, relpath);
+ }
- public String getTempLocation() {
- return templocation;
- }
+ public boolean isModified() {
+ if (timeStamp == -1)
+ return true;
+ try {
+ File f = new File(location);
+ return (timeStamp != f.lastModified() || size != f.length());
+ } catch (Exception e) {
+ return true;
+ }
+ }
+ public void invalidate() {
+ exists = false;
+ map.clear();
+ timeStamp = -1;
+ size = -1;
+ }
+
+ public String getTempLocation() {
+ return templocation;
+ }
+
}
class LFileObjectJarImpl implements LFileObject {
- private JarAccess access = null;
- private String aliaspath = null;
- private String relpath = null;
+ private JarAccess access = null;
+ private String aliaspath = null;
+ private String relpath = null;
- public LFileObjectJarImpl(JarAccess access, String alias, String relpath) {
- this.access = access;
- aliaspath = relpath.length() == 0 ? alias : alias + '/' + relpath;
- this.relpath = relpath;
- }
+ public LFileObjectJarImpl(JarAccess access, String alias, String relpath) {
+ this.access = access;
+ aliaspath = relpath.length() == 0 ? alias : alias + '/' + relpath;
+ this.relpath = relpath;
+ }
- public String getName() {
- return relpath.substring(relpath.lastIndexOf('/') + 1);
- }
+ public String getName() {
+ return relpath.substring(relpath.lastIndexOf('/') + 1);
+ }
- public boolean exists() {
- return access.hasFolder(relpath) || access.hasFile(relpath);
- }
+ public boolean exists() {
+ return access.hasFolder(relpath) || access.hasFile(relpath);
+ }
- public boolean isDirectory() {
- return access.hasFolder(relpath);
- }
+ public boolean isDirectory() {
+ return access.hasFolder(relpath);
+ }
- public boolean isFile() {
- return access.hasFile(relpath);
- }
+ public boolean isFile() {
+ return access.hasFile(relpath);
+ }
- public long lastModified() {
- return 0;
- }
+ public long lastModified() {
+ return 0;
+ }
- public String getPath() {
- return aliaspath;
- }
+ public String getPath() {
+ return aliaspath;
+ }
- public boolean canWrite() {
- return false;
- }
+ public boolean canWrite() {
+ return false;
+ }
- public String read() {
- return access.getContent(relpath);
- }
+ public String read() {
+ return access.getContent(relpath);
+ }
- public void write(String s) {}
+ public void write(String s) {
+ }
- public String[] listFiles() {
- String[] r = access.getChildren(relpath);
- String rp = getPath();
- for (int i = 0; i < r.length; i++) {
- if(r[i].endsWith("/")) r[i] = r[i].substring(0, r[i].length() - 1);
- r[i] = rp + "/" + r[i];
- }
- return r;
- }
+ public String[] listFiles() {
+ String[] r = access.getChildren(relpath);
+ String rp = getPath();
+ for (int i = 0; i < r.length; i++) {
+ if (r[i].endsWith("/"))
+ r[i] = r[i].substring(0, r[i].length() - 1);
+ r[i] = rp + "/" + r[i];
+ }
+ return r;
+ }
- public boolean mkdirs() {
- return false;
- }
+ public boolean mkdirs() {
+ return false;
+ }
- public boolean delete() {
- return false;
- }
+ public boolean delete() {
+ return false;
+ }
}
-
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java 2007-08-06 15:37:16 UTC (rev 2918)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java 2007-08-06 15:54:41 UTC (rev 2919)
@@ -57,6 +57,7 @@
if(loaded || !isActive()) return;
JarAccess jar = getJarSystem().getJarAccess();
if(!jar.isLoaded()) return;
+ jar.lockJar();
loaded = true;
String path = getAbsolutePath();
String[] cs = jar.getChildren(path);
@@ -74,6 +75,7 @@
}
}
fire = true;
+ jar.unlockJar();
}
private void createFileObject(JarAccess jar, String path, String name) {
18 years, 5 months
JBoss Tools SVN: r2918 - in trunk/hibernatetools/plugins: org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-08-06 11:37:16 -0400 (Mon, 06 Aug 2007)
New Revision: 2918
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
Log:
EXIN-413: Incorrect relations between elements of diagram
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java 2007-08-06 15:00:45 UTC (rev 2917)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmShape.java 2007-08-06 15:37:16 UTC (rev 2918)
@@ -62,28 +62,30 @@
Iterator iterator = rootClass.getPropertyIterator();
while (iterator.hasNext()) {
Property field = (Property)iterator.next();
- if (!field.isComposite()) {
- boolean typeIsAccessible = true;
- if (field.getValue().isSimpleValue() && ((SimpleValue)field.getValue()).isTypeSpecified()) {
- try {
- field.getValue().getType();
- } catch (Exception e) {
- typeIsAccessible = false;
+ if (!field.isBackRef()) {
+ if (!field.isComposite()) {
+ boolean typeIsAccessible = true;
+ if (field.getValue().isSimpleValue() && ((SimpleValue)field.getValue()).isTypeSpecified()) {
+ try {
+ field.getValue().getType();
+ } catch (Exception e) {
+ typeIsAccessible = false;
+ }
}
- }
- if (field.getValue().isSimpleValue() && !((SimpleValue)field.getValue()).isTypeSpecified()) {
- bodyOrmShape = new Shape(field);
- } else if (typeIsAccessible && field.getValue().getType().isEntityType()) {
+ if (field.getValue().isSimpleValue() && !((SimpleValue)field.getValue()).isTypeSpecified()) {
+ bodyOrmShape = new Shape(field);
+ } else if (typeIsAccessible && field.getValue().getType().isEntityType()) {
+ bodyOrmShape = new ExpandeableShape(field);
+ } else if (typeIsAccessible && field.getValue().getType().isCollectionType()) {
+ bodyOrmShape = new ComponentShape(field);
+ } else {
+ bodyOrmShape = new Shape(field);
+ }
+ getChildren().add(bodyOrmShape);
+ } else {
bodyOrmShape = new ExpandeableShape(field);
- } else if (typeIsAccessible && field.getValue().getType().isCollectionType()) {
- bodyOrmShape = new ComponentShape(field);
- } else {
- bodyOrmShape = new Shape(field);
+ getChildren().add(bodyOrmShape);
}
- getChildren().add(bodyOrmShape);
- } else {
- bodyOrmShape = new ExpandeableShape(field);
- getChildren().add(bodyOrmShape);
}
}
} else if (ormElement instanceof Subclass) {
@@ -106,37 +108,41 @@
Iterator iterator = rootClass.getPropertyIterator();
while (iterator.hasNext()) {
Property field = (Property)iterator.next();
- if (!field.isComposite()) {
- if (field.getValue().isSimpleValue()) {
- bodyOrmShape = new Shape(field);
- } else if (field.getValue().getType().isEntityType()) {
+ if (!field.isBackRef()) {
+ if (!field.isComposite()) {
+ if (field.getValue().isSimpleValue()) {
+ bodyOrmShape = new Shape(field);
+ } else if (field.getValue().getType().isEntityType()) {
+ bodyOrmShape = new ExpandeableShape(field);
+ } else if (field.getValue().getType().isCollectionType()) {
+ bodyOrmShape = new ComponentShape(field);
+ } else {
+ bodyOrmShape = new Shape(field);
+ }
+ getChildren().add(bodyOrmShape);
+ } else {
bodyOrmShape = new ExpandeableShape(field);
- } else if (field.getValue().getType().isCollectionType()) {
- bodyOrmShape = new ComponentShape(field);
- } else {
- bodyOrmShape = new Shape(field);
+ getChildren().add(bodyOrmShape);
}
- getChildren().add(bodyOrmShape);
- } else {
- bodyOrmShape = new ExpandeableShape(field);
- getChildren().add(bodyOrmShape);
}
}
Iterator iter = ((Subclass)ormElement).getPropertyIterator();
while (iter.hasNext()) {
Property property = (Property)iter.next();
- if (!property.isComposite()) {
- if (property.getValue().getType().isEntityType()) {
+ if (!property.isBackRef()) {
+ if (!property.isComposite()) {
+ if (property.getValue().getType().isEntityType()) {
+ bodyOrmShape = new ExpandeableShape(property);
+ } else if (property.getValue().getType().isCollectionType()) {
+ bodyOrmShape = new ComponentShape(property);
+ } else {
+ bodyOrmShape = new Shape(property);
+ }
+ } else {
bodyOrmShape = new ExpandeableShape(property);
- } else if (property.getValue().getType().isCollectionType()) {
- bodyOrmShape = new ComponentShape(property);
- } else {
- bodyOrmShape = new Shape(property);
}
- } else {
- bodyOrmShape = new ExpandeableShape(property);
+ getChildren().add(bodyOrmShape);
}
- getChildren().add(bodyOrmShape);
}
} else if (ormElement instanceof Table) {
Iterator iterator = ((Table)getOrmElement()).getColumnIterator();
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-08-06 15:00:45 UTC (rev 2917)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-08-06 15:37:16 UTC (rev 2918)
@@ -23,6 +23,8 @@
import org.hibernate.mapping.SingleTableSubclass;
import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.Table;
+import org.hibernate.type.EntityType;
+import org.hibernate.type.ManyToOneType;
public class OrmModelNameVisitor /*implements IOrmModelVisitor*/ {
@@ -42,204 +44,6 @@
this.viewer = viewer;
}
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitOrmModel(org.jboss.tools.hibernate.core.IOrmProject, java.lang.Object)
- */
-// public Object visitOrmProject(IOrmProject schema, Object argument) {
-// return schema.getName();
-// }
-
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitDatabaseSchema(org.jboss.tools.hibernate.core.IDatabaseSchema, java.lang.Object)
- */
-// public Object visitDatabaseSchema(IDatabaseSchema schema, Object argument) {
-// if (schema.getName() == null || schema.getName().trim().length() == 0) {
-// return BUNDLE
-// .getString("OrmModelNameVisitor.DefaultDatabaseSchema");
-// } else {
-// return schema.getName();
-// }
-// }
-
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitDatabaseTable(org.jboss.tools.hibernate.core.IDatabaseTable, java.lang.Object)
- */
-// public Object visitDatabaseTable(IDatabaseTable table, Object argument) {
-// // Table name (Class1, Class2 ...)
-// // add tau 13.04.2005
-// // edit tau 28.04.2005 -> vs ()
-// StringBuffer name = new StringBuffer();
-// name.append(table.getName());
-//
-// IPersistentClassMapping[] classMappings = table
-// .getPersistentClassMappings();
-// if (classMappings.length != 0) {
-// name.append(POINTER);
-// for (int i = 0; i < classMappings.length; i++) {
-// IPersistentClass persistentClass = classMappings[i]
-// .getPersistentClass();
-// if (persistentClass != null) {
-// name.append(persistentClass.getName());
-// name.append(BUNDLE.getString("OrmModelNameVisitor.Comma"));
-// name.append(" ");
-// }
-// }
-// name.delete(name.length() - 2, name.length());
-// }
-// return name.toString();
-//
-// }
-
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitDatabaseColumn(org.jboss.tools.hibernate.core.IDatabaseColumn, java.lang.Object)
- */
-// public Object visitDatabaseColumn(IDatabaseColumn column, Object argument) {
-// // update tau 16.03.2005
-// StringBuffer name = new StringBuffer();
-// name.append(column.getName());
-// //by Nick 22.04.2005
-//
-// int length = -1;
-// int scale = -1;
-//
-// if (!column.isNativeType()) {
-// int typeCode = column.getSqlTypeCode();
-// String typeName = column.getSqlTypeName();
-//
-// if (typeName == null)
-// typeCode = Types.NULL;
-//
-// //by Nick
-//
-// // (tau->tau) Column types should be shown in the following manner:
-// /*
-//
-// Character types:
-// VARCHAR(length)
-// CHAR(length)
-//
-// Numeric types:
-// NUMBER(length, precision)
-// NUMERIC(length, precision)
-//
-// Other types:
-// BIT
-// INTEGER
-// BIGNINT
-// DATE
-// FLOAT
-// REAL
-// CLOB
-// BINARY
-// etc. */
-// //by Nick 22.04.2005
-// // TODO (tau->tau)
-// // testing for ORACLE
-// // edit tau 28.04.2005 -> vs ()
-// switch (typeCode) {
-// case Types.VARCHAR:
-// case Types.CHAR:
-// case Types.NUMERIC:
-// case Types.DECIMAL: //8.07.2005 by Nick DECIMAL JDBC type denotes Oracle NUMBER type
-// //changed by Nick 10.05.2005 - fixes "->" in SQL types
-// if (typeCode == Types.NUMERIC || typeCode == Types.DECIMAL) {
-// length = column.getPrecision();
-// scale = column.getScale();
-// } else {
-// length = column.getLength();
-// }
-//
-// default:
-// break;
-//
-// }
-// } else {
-// if (column.getLength() > Column.DEFAULT_LENGTH) {
-// length = column.getLength();
-// } else if (column.getPrecision() > Column.DEFAULT_PRECISION
-// || column.getScale() > Column.DEFAULT_SCALE) {
-// length = column.getPrecision() > Column.DEFAULT_PRECISION ? (column
-// .getPrecision())
-// : (column.getScale() > 0 ? column.getScale() : 1);
-// scale = column.getScale();
-// }
-// }
-//
-// StringBuffer typeName = new StringBuffer(column.getSqlTypeName());
-//
-// //by Nick
-//
-// // (tau->tau) Column types should be shown in the following manner:
-// /*
-//
-// Character types:
-// VARCHAR(length)
-// CHAR(length)
-//
-// Numeric types:
-// NUMBER(length, precision)
-// NUMERIC(length, precision)
-//
-// Other types:
-// BIT
-// INTEGER
-// BIGNINT
-// DATE
-// FLOAT
-// REAL
-// CLOB
-// BINARY
-// etc. */
-// //by Nick 22.04.2005
-// /*
-// switch (key) {
-// case value:
-//
-// break;
-//
-// default:
-// break;
-// }
-// */
-//
-// // TODO (tau->tau)
-// // testing for ORACLE
-//
-// StringBuffer lpBuffer = new StringBuffer();
-// //name.append(POINTER);
-//
-// if (length > Column.DEFAULT_LENGTH) {
-// lpBuffer.append(SPACE);
-// lpBuffer.append(BUNDLE
-// .getString("OrmModelNameVisitor.OpenBrackets"));
-// lpBuffer.append(length);
-// if (scale > Column.DEFAULT_SCALE) {
-// lpBuffer.append(BUNDLE.getString("OrmModelNameVisitor.Comma"));
-// lpBuffer.append(SPACE);
-// lpBuffer.append(scale);
-// }
-// lpBuffer.append(BUNDLE
-// .getString("OrmModelNameVisitor.CloseBrackets"));
-// }
-// //by Nick
-//
-// if (typeName.length() != 0) {
-// // edit tau 28.04.2005 -> vs ()
-// //8.07.2005 by Nick DECIMAL JDBC type denotes Oracle NUMBER type
-// //changed by Nick 10.05.2005 - fixes "->" in SQL types
-// name.append(BUNDLE.getString("OrmModelNameVisitor.Colon"));
-// name.append(SPACE);
-// typeName.append(lpBuffer);
-// }
-//
-// name.append(typeName);
-// // name.append(SPACE);
-//
-// // by Nick
-// return name.toString();
-//
-// }
-
public Object visitDatabaseColumn(Column column, Object argument) {
// update tau 16.03.2005
StringBuffer name = new StringBuffer();
@@ -406,68 +210,6 @@
}
- /* (non-Javadoc)
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitDatabaseConstraint(org.jboss.tools.hibernate.core.IDatabaseConstraint, java.lang.Object)
- */
-// public Object visitDatabaseConstraint(IDatabaseConstraint constraint,
-// Object argument) {
-// return constraint.getName();
-// }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitPackage(org.jboss.tools.hibernate.core.IPackage, java.lang.Object)
- */
-// public Object visitPackage(IPackage pakage, Object argument) {
-// if (pakage.getName() == null || pakage.getName().trim().length() == 0) {
-// return BUNDLE.getString("OrmModelNameVisitor.DefaultPackageName");
-// } else {
-// //return pakage.getName();
-// return pakage.getProjectQualifiedName();
-// }
-// }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitMapping(org.jboss.tools.hibernate.core.IMapping, java.lang.Object)
- */
-// public Object visitMapping(IMapping mapping, Object argument) {
-// return mapping.getName();
-// }
-
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitMappingStorage(org.jboss.tools.hibernate.core.IMappingStorage, java.lang.Object)
- */
-// public Object visitMappingStorage(IMappingStorage storage, Object argument) {
-// return storage.getName();
-// }
-
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitPersistentClass(org.jboss.tools.hibernate.core.IPersistentClass, java.lang.Object)
- */
-// public Object visitPersistentClass(IPersistentClass clazz, Object argument) {
-//
-// StringBuffer name = new StringBuffer();
-// if (((OrmContentProvider) viewer.getContentProvider()).getTip() == OrmContentProvider.PACKAGE_CLASS_FIELD_CONTENT_PROVIDER) {
-// name.append(clazz.getShortName());
-// } else {
-// name.append(clazz.getName());
-// }
-//
-// //edit tau 24.04.2006
-// IDatabaseTable table = clazz.getDatabaseTable(); // upd tau 06.06.2005
-// //IDatabaseTable table = HibernateAutoMappingHelper.getPrivateTable(classMapping); // upd tau 18.04.2005
-// if (table != null) {
-// String tableName = table.getName();
-// if (tableName != null) {
-// //name.append(" (");
-// name.append(POINTER);
-// name.append(tableName);
-// //name.append(")");
-// }
-// }
-//
-// return name.toString();
-// }
-
public Object visitPersistentClass(RootClass clazz, Object argument) {
StringBuffer name = new StringBuffer();
@@ -502,208 +244,38 @@
public Object visitPersistentClass(Subclass clazz, Object argument) {
StringBuffer name = new StringBuffer();
-// if (((OrmContentProvider) viewer.getContentProvider()).getTip() == OrmContentProvider.PACKAGE_CLASS_FIELD_CONTENT_PROVIDER) {
- name.append(clazz.getEntityName());
-// } else {
-// name.append(clazz.getEntityName());
-// }
+ name.append(clazz.getEntityName());
- //edit tau 24.04.2006
- Table table = clazz.getTable(); // upd tau 06.06.2005
- //IDatabaseTable table = HibernateAutoMappingHelper.getPrivateTable(classMapping); // upd tau 18.04.2005
+ Table table = clazz.getTable();
if (table != null) {
- String tableName = table.getName();
+ String tableName = TextUtil.getTableName(table);
if (tableName != null) {
- //name.append(" (");
name.append(POINTER);
name.append(tableName);
- //name.append(")");
}
}
return name.toString();
}
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitPersistentField(org.jboss.tools.hibernate.core.IPersistentField, java.lang.Object)
- */
-// public Object visitPersistentField(IPersistentField field, Object argument) {
-// StringBuffer name = new StringBuffer();
-// name.append(field.getName());
-// name.append(BUNDLE.getString("OrmModelNameVisitor.Colon"));
-// String typeString = field.getType();
-//
-// if (typeString != null) {
-// //added by Nick 31.03.2005
-// IPersistentValueMapping value = null;
-// if (field.getMapping() != null)
-// value = field.getMapping().getPersistentValueMapping();
-//
-// //added by Nick 18.04.2005 - to handle BLOB mappings
-// if (Signature.getArrayCount(typeString) != 0) {
-// // changed by Nick 20.10.2005
-// int depth = Signature.getArrayCount(typeString);
-// typeString = Signature.getElementType(typeString);
-// for (int i = 0; i < depth; i++) {
-// typeString += "[]";
-// }
-// // by Nick
-// }
-//
-// //by Nick
-// if (value != null && value instanceof CollectionMapping
-// && !(value instanceof ArrayMapping)) {
-// String elementsClsName = ((CollectionMapping) value)
-// .getCollectionElementClassName();
-// if (elementsClsName != null)
-// typeString = field.getType() + "(" + elementsClsName + ")";
-// }
-//
-// if (value != null && value instanceof CollectionMapping) {
-// //added by Nick 12.05.2005 to show collection table in explorer
-// IDatabaseTable collectionTable = ((CollectionMapping) value)
-// .getCollectionTable();
-// if (collectionTable != null
-// && collectionTable.getShortName() != null)
-// typeString += POINTER + collectionTable.getShortName();
-// //by Nick
-// }
-// //by Nick
-// name.append(typeString);
-//
-// // added by Nick 29.07.2005
-// if (field.getGenerifiedTypes() != null) {
-// String[] types = field.getGenerifiedTypes();
-//
-// StringBuffer buf = new StringBuffer("<");
-//
-// for (int i = 0; i < types.length; i++) {
-// String string = types[i];
-// buf.append(string);
-//
-// if (i != types.length - 1)
-// buf.append(", ");
-// }
-//
-// buf.append(">");
-//
-// name.append(buf);
-// }
-// // by Nick
-// }
-// return name.toString();
-//
-// }
-
public Object visitPersistentField(Property field, Object argument) {
StringBuffer name = new StringBuffer();
name.append(field.getName());
name.append(BUNDLE.getString("OrmModelNameVisitor.Colon"));
- String typeString = "";
- try {
+ String typeString = null;
+ if (field.getType().isEntityType()) {
+ typeString = ((EntityType)field.getType()).getAssociatedEntityName();
+ } else {
typeString = field.getType().getReturnedClass().getName();
- } catch (Exception e) {}
-
+ }
if (typeString != null) {
-/* IPersistentValueMapping value = null;
- if (field.getMapping() != null)
- value = field.getMapping().getPersistentValueMapping();
-
- if (Signature.getArrayCount(typeString) != 0)
- {
- int depth = Signature.getArrayCount(typeString);
- typeString = Signature.getElementType(typeString);
- for (int i = 0; i < depth; i++) {
- typeString += "[]";
- }
- }
-
- if (value != null && value instanceof CollectionMapping && !(value instanceof ArrayMapping))
- {
- String elementsClsName = ((CollectionMapping)value).getCollectionElementClassName();
- if (elementsClsName != null)
- typeString = field.getType() + "(" + elementsClsName + ")";
- }
-
- if (value != null && value instanceof CollectionMapping)
- {
- IDatabaseTable collectionTable = ((CollectionMapping)value).getCollectionTable();
- if (collectionTable != null && collectionTable.getShortName() != null)
- typeString += POINTER + collectionTable.getShortName();
- }*/
name.append(typeString);
-
-/* if (field.getGenerifiedTypes() != null)
- {
- String[] types = field.getGenerifiedTypes();
-
- StringBuffer buf = new StringBuffer("<");
-
- for (int i = 0; i < types.length; i++) {
- String string = types[i];
- buf.append(string);
-
- if (i != types.length - 1)
- buf.append(", ");
- }
-
- buf.append(">");
-
- name.append(buf);
- }*/
- }
+ }
+
return name.toString();
}
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitPersistentClassMapping(org.jboss.tools.hibernate.core.IPersistentClassMapping, java.lang.Object)
- */
-// public Object visitPersistentClassMapping(IPersistentClassMapping mapping,
-// Object argument) {
-// // add tau 22.04.2005
-// // Class mapping should be shown as Class name -> table name
-//
-// StringBuffer name = new StringBuffer();
-// name.append(mapping.getName());
-//
-// IDatabaseTable table = HibernateAutoMappingHelper
-// .getPrivateTable(mapping); // upd tau 22.04.2005
-// if (table != null) {
-// String tableName = table.getName();
-// if (tableName != null) {
-// name.append(POINTER);
-// name.append(tableName);
-// }
-// }
-//
-// return name.toString();
-//
-// }
-
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitPersistentFieldMapping(org.jboss.tools.hibernate.core.IPersistentFieldMapping, java.lang.Object)
- */
-// public Object visitPersistentFieldMapping(IPersistentFieldMapping mapping,
-// Object argument) {
-// return mapping.getName();
-// }
-
- /**
- * @see org.jboss.tools.hibernate.core.IOrmModelVisitor#visitPersistentValueMapping(org.jboss.tools.hibernate.core.IPersistentValueMapping, java.lang.Object)
- */
-// public Object visitPersistentValueMapping(IPersistentValueMapping mapping,
-// Object argument) {
-// return mapping.getName();
-// }
-
- // add tau 27.07.2005
-// public Object visitNamedQueryMapping(INamedQueryMapping mapping,
-// Object argument) {
-// return mapping.getName();
-// }
-
-
public Object visitCollectionKeyMapping(DependantValue mapping, Object argument) {
return "key";
}
18 years, 5 months
JBoss Tools SVN: r2917 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors: parts and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-08-06 11:00:45 -0400 (Mon, 06 Aug 2007)
New Revision: 2917
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java
Log:
http://jira.jboss.com/jira/browse/EXIN-365
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-08-06 14:19:13 UTC (rev 2916)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-08-06 15:00:45 UTC (rev 2917)
@@ -78,7 +78,7 @@
getOrCreatePersistentClass(ormElement, null);
expandModel(this);
load();
- dirty = false;
+ setDirty(false);
}
private IPath getStoreFolderPath() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java 2007-08-06 14:19:13 UTC (rev 2916)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java 2007-08-06 15:00:45 UTC (rev 2917)
@@ -207,8 +207,10 @@
if (!isActive()) {
super.activate();
((ModelElement) getModel()).addPropertyChangeListener(this);
- if(!getCastedModel().isLoadSuccessfull())
+ if(!getCastedModel().isLoadSuccessfull()){
autolayout();
+ getCastedModel().setDirty(false);
+ }
// restore();
}
}
18 years, 5 months
JBoss Tools SVN: r2916 - trunk/jsf/features/org.jboss.tools.richfaces.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-08-06 10:19:13 -0400 (Mon, 06 Aug 2007)
New Revision: 2916
Modified:
trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml
Log:
http://jira.jboss.com/jira/browse/EXIN-408
JBoss AS 4.2.0 initialization during startup is moved to separate plugin org.jboss.tools.jst.firstrun and included in or.jboss.tools.jst.feature.
Modified: trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml
===================================================================
--- trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml 2007-08-06 14:13:03 UTC (rev 2915)
+++ trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.xml 2007-08-06 14:19:13 UTC (rev 2916)
@@ -454,4 +454,11 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.jboss.tools.jst.firstrun"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
18 years, 5 months
JBoss Tools SVN: r2915 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-08-06 10:13:03 -0400 (Mon, 06 Aug 2007)
New Revision: 2915
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java
Log:
http://jira.jboss.com/jira/browse/EXIN-365
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-08-06 13:36:34 UTC (rev 2914)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-08-06 14:13:03 UTC (rev 2915)
@@ -74,11 +74,17 @@
if(getFigure().getChildren().size() > 0){
((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new RGB(255,255,255)));
+ }else{
+ getFigure().setBackgroundColor(getSelectionColor());
+ getFigure().setForegroundColor(ResourceManager.getInstance().getColor(new RGB(255,255,255)));
}
} else if (Shape.HIDE_SELECTION.equals(prop)) {
if(getFigure().getChildren().size() > 0){
((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getColor());
((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new RGB(0,0,0)));
+ }else{
+ getFigure().setBackgroundColor(getColor());
+ getFigure().setForegroundColor(ResourceManager.getInstance().getColor(new RGB(0,0,0)));
}
}else if (ExpandeableShape.SHOW_REFERENCES.equals(prop)) {
refreshReferences((Shape)getCastedModel(), ((ExpandeableShape)getCastedModel()).isReferenceVisible());
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java 2007-08-06 13:36:34 UTC (rev 2914)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java 2007-08-06 14:13:03 UTC (rev 2915)
@@ -216,9 +216,9 @@
Integer.parseInt(Messages.Colors_DatabaseTableB)));
else if (element instanceof OneToMany)
return ResourceManager.getInstance().getColor(new RGB(
- Integer.parseInt(Messages.Colors_DatabaseTableR),
- Integer.parseInt(Messages.Colors_DatabaseTableG),
- Integer.parseInt(Messages.Colors_DatabaseTableB)));
+ Integer.parseInt(Messages.Colors_PersistentFieldR),
+ Integer.parseInt(Messages.Colors_PersistentFieldG),
+ Integer.parseInt(Messages.Colors_PersistentFieldB)));
else
return ResourceManager.getInstance().getColor(new RGB(255, 0, 0));
// throw new IllegalArgumentException();
@@ -234,7 +234,7 @@
return ResourceManager.getInstance().getColor(new RGB(66,173,247));
//else
//throw new IllegalArgumentException();
- return ResourceManager.getInstance().getColor(new RGB(190,190,190));
+ return ResourceManager.getInstance().getColor(new RGB(255,0,0));
}
private class ShapesSelectionEditPolicy extends SelectionEditPolicy {
18 years, 5 months
JBoss Tools SVN: r2914 - in trunk/documentation: whatsnew and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-08-06 09:36:34 -0400 (Mon, 06 Aug 2007)
New Revision: 2914
Added:
trunk/documentation/whatsnew/
trunk/documentation/whatsnew/default_.css
trunk/documentation/whatsnew/seam/
trunk/documentation/whatsnew/seam/seam-news-1.0.0.beta1.html
Log:
initial new and noteworthy (only seam for now)
Added: trunk/documentation/whatsnew/default_.css
===================================================================
--- trunk/documentation/whatsnew/default_.css (rev 0)
+++ trunk/documentation/whatsnew/default_.css 2007-08-06 13:36:34 UTC (rev 2914)
@@ -0,0 +1,15 @@
+p, table, td, th { font-family: verdana, arial, helvetica, geneva; font-size: 10pt}
+pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
+h2 { font-family: verdana, arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
+code { font-family: "Courier New", Courier, mono; font-size: 10pt}
+sup { font-family: verdana, arial, helvetica, geneva; font-size: 10px}
+h3 { font-family: verdana, arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
+li { font-family: verdana, arial, helvetica, geneva; font-size: 10pt}
+h1 { font-family: verdana, arial, helvetica, geneva; font-size: 24pt; font-weight: bold}
+body { font-family: verdana, arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
+.indextop { font-size: x-large;; font-family: verdana, arial, helvetica, sans-serif; font-weight: bold}
+.indexsub { font-size: xx-small;; font-family: verdana, arial, helvetica, sans-serif; color: #8080FF}
+a.bar:link { text-decoration: none; color: #FFFFFF}
+a.bar:visited { color: #FFFFFF; text-decoration: none}
+a.bar:hover { color: #FFFFFF; text-decoration: underline}
+a.bar { color: #FFFFFF}
Added: trunk/documentation/whatsnew/seam/seam-news-1.0.0.beta1.html
===================================================================
--- trunk/documentation/whatsnew/seam/seam-news-1.0.0.beta1.html (rev 0)
+++ trunk/documentation/whatsnew/seam/seam-news-1.0.0.beta1.html 2007-08-06 13:36:34 UTC (rev 2914)
@@ -0,0 +1,220 @@
+<html>
+
+<head>
+<link rel="stylesheet" href="default_.css">
+<title>Seam Tools 1.0.beta1 News</title>
+</head>
+
+<body>
+
+<h1>Seam Tools 1.0.beta1 - New and Noteworthy</h1>
+
+<html>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr>
+ <h3>Seam Projects</h3>
+ <hr>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Enable Seam Support</b></td>
+ <td valign="top">
+ <p>This plugin is the first in enabling Seam for Eclipse
+ projects. Currently there are two ways to enable it, use the
+ Seam Web Project Wizard and have a basic Seam Web project be
+ ready with Seam support or enable it on existing projects by
+ right clicking on the project and choose "Enable/Disable Seam
+ support"</p>
+
+ <p><img src="enableseam.png"/></p>
+
+ <p>Seam support on projects does *not* require your
+ eclipse project to be a WTP project, it can be a plain old
+ Eclipse project (e.g. generated by Seam's seam-gen).</p>
+
+ <p>In practice enabling "Seam support" on your project
+ installs the Seam Eclipse builder on your project which will scan your
+ project for Seam artifacts (annotations, component.xml,
+ seam.properties, etc.) to provide the various features.</p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>Views</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Seam Components</b></td>
+ <td valign="top">
+ <p>The Seam components view provides a list of the seam components found in the project.</p>
+
+ <p><img src="seamcomponentsview.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Component filters</b></td>
+ <td valign="top">
+
+ <p>The size of the list can be quite daunting so you can filter
+the content to ignore components only defined in jar's. This will
+hide the many built-in Seam components and leave only those left that
+are actually defined in the project or have actively configured via
+components.xml</p>
+
+ <p><img src="seamcomponentsview-filter.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Scope presentation</b></td>
+ <td valign="top">
+ <p>The Seam Component View can show a components default scope
+ in two ways. As labels on each component or as a node per scope
+ where the components beneath it is in the same scope.</p>
+ <p><img src="revengstrategyinui.png"></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Project Explorer integration</b></td>
+ <td valign="top">
+ <p>If you don't like to have a view for every piece of
+ information in Eclipse, the content of the Seam Components view
+ is also avaible as a node in the built-in "Project Explorer"
+ (not "Package Explorer") view in Eclipse.</p>
+
+ <p><img src="seamcomponentsview-projectexplorer.png"/></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>Validation</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Seam Validation</b></td>
+ <td valign="top">
+ <p>Validation of various possible problematic definitions in Seam applications have been implemented. If an issue is found it will show up in the standard "Problems View".</p>
+
+ <p>The validations can be run manually via the context menu on
+ your project and click "Validate" which will execute all the
+ WTP validations active on your project</p>
+
+ <p>On WTP projects it is by default executed automatically,
+ but on normal Java projects you will have to go and enable
+ the Validation builder on your project . It is available in
+ the properties of your project under "Validation".</p>
+
+ <p><img src="seamvalidation.png"></p>
+
+ <p>The validations can be individually configured to be ignored or reported as Error or Warning.</p>
+
+ <p><img src="seamvalidationpreferences.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>Code completion</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Code completion for Seam Components</b></td>
+ <td valign="top">
+ <p>Last release brought an exporter that generates a basic CRUD <a
+ href="http://www.jboss.com/products/seam">JBoss Seam</a>
+ application. In this version this has been made complete and now generates a full working Seam application; read the generated README.TXT for details on how to deploy it</p>
+
+ <p><img src="codegenlaunchseamexporter.png"></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Expression language "everywhere"!</b></td>
+ <td valign="top">
+ <p>Last release brought an exporter that generates a basic CRUD <a
+ href="http://www.jboss.com/products/seam">JBoss Seam</a>
+ application. In this version this has been made complete and now generates a full working Seam application; read the generated README.TXT for details on how to deploy it</p>
+
+ <p><img src="codegenlaunchseamexporter.png"></p>
+ </td>
+ </tr>
+ <tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>Wizards</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Seam Project Wizard</b></td>
+ <td valign="top">
+ <p>Last release brought an exporter that generates a basic CRUD <a
+ href="http://www.jboss.com/products/seam">JBoss Seam</a>
+ application. In this version this has been made complete and now generates a full working Seam application; read the generated README.TXT for details on how to deploy it</p>
+
+ <p><img src="codegenlaunchseamexporter.png"></p>
+ </td>
+ </tr>
+ <tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>seam-gen</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Seam-Gen menu</b></td>
+ <td valign="top">
+ <p>Instead of using the Seam Wizards (which generates WTP projects) some users prefer to use the seam-gen tool provided by Seam more directly.
+ <p>Furthermore not all seam-gen provided functionallity is
+available in the Seam Wizards just yet, so for that we currently
+provide a Seam-Gen menu that is merely a wrapper around the seam-gen
+build.xml script - hence this menu does *exactly* what seam-gen does;
+nothing more and nothing less (except for automatically register the
+project and database connection in Eclipse - but that's it).</p>
+
+ <p></p>
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
18 years, 5 months
JBoss Tools SVN: r2913 - trunk/documentation/GettingStartedGuide/docs/userguide/en/images.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-08-06 07:37:45 -0400 (Mon, 06 Aug 2007)
New Revision: 2913
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/startingfromicon.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/startingfromserversview.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/stoppingserver2.png
Log:
changed images
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/startingfromicon.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/startingfromserversview.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/stoppingserver2.png
===================================================================
(Binary files differ)
18 years, 5 months
JBoss Tools SVN: r2912 - trunk/documentation/GettingStartedGuide/docs/userguide/en/images.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-08-06 06:33:44 -0400 (Mon, 06 Aug 2007)
New Revision: 2912
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/configuringprojects.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/consoleoutput.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/jbossruntime.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/serverpreferences.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/servertype.png
Log:
screens resizing
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/configuringprojects.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/consoleoutput.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/jbossruntime.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/serverpreferences.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/servertype.png
===================================================================
(Binary files differ)
18 years, 5 months
JBoss Tools SVN: r2911 - trunk/documentation/GettingStartedGuide/docs/userguide/en/images.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-08-06 06:18:33 -0400 (Mon, 06 Aug 2007)
New Revision: 2911
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/serveroverview.png
Log:
minor update
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/serveroverview.png
===================================================================
(Binary files differ)
18 years, 5 months
JBoss Tools SVN: r2910 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-08-06 05:24:42 -0400 (Mon, 06 Aug 2007)
New Revision: 2910
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/jbossruntime.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newjbossserver.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/servertype.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
Log:
http://jira.jboss.com/jira/browse/EXIN-401 updated text context, changed images
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/jbossruntime.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newjbossserver.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/servertype.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-08-04 07:07:44 UTC (rev 2909)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-08-06 09:24:42 UTC (rev 2910)
@@ -11,7 +11,7 @@
</keywordset>
</chapterinfo>
<title>Manage JBoss AS from Red Hat Developer Studio</title>
- <para>Red Hat Developer Studio ships with JBoss AS v.4.2 bundled. When you followed the default installation of Red Hat Developer Studio, you already have a JBoss 4.2 server installed and defined. To run JBoss AS 4.2 you need JDK 1.5. JDK 6 is not formally supported yet, although you may be able to start the server with it.</para>
+ <para>Red Hat Developer Studio ships with JBoss EAP v.4.2 bundled. When you followed the default installation of Red Hat Developer Studio, you already have a JBoss 4.2 server installed and defined. To run JBoss AS 4.2 you need JDK 1.5. JDK 6 is not formally supported yet, although you may be able to start the server with it.</para>
<section id="JBossbundled">
<?dbhtml filename="JBossbundled.html"?>
<title>How to manage the JBoss AS bundled in RHDS</title>
@@ -111,108 +111,18 @@
<section id="JBossInstances">
<?dbhtml filename="JBossInstances.html"?>
<title>How to manage JBoss AS instances in RHDS</title>
- <para>Although Red Hat Developer Studio works closely with JBoss AS 4.2 we do not ultimately tie you to any particular server for deployment. There are some servers that Studio supports directly (through the bundled Eclipse WTP plug-ins). Suppose you want to deploy the application to JBoss 4.0.5 server. First of all you need to install it.</para>
+ <para>Although Red Hat Developer Studio works closely with JBoss EAP 4.2 we do not ultimately tie you to any particular server for deployment. There are some servers that Studio supports directly (through the bundled Eclipse WTP plug-ins). Suppose you want to deploy the application to JBoss 4.2.1 server. First of all you need to install it.</para>
<section id="JBossInstalling">
<?dbhtml filename="JBossInstalling.html"?>
<title>JBoss AS Installation</title>
<orderedlist>
-<listitem><para>Download the installation pack of JBoss 4.0.5 and save it on your computer: <ulink url="http://labs.jboss.com/jbossas/downloads">http://labs.jboss.com/jbossas/downloads</ulink></para></listitem>
-<listitem><para>Double-click this file or launch the installation from terminal like this:</para></listitem>
+<listitem><para>Download the binary package of JBoss 4.2.1 and save it on your computer: <ulink url="http://labs.jboss.com/jbossas/downloads">http://labs.jboss.com/jbossas/downloads</ulink></para></listitem>
</orderedlist>
-<programlisting role="JAVA"><![CDATA[java -jar jems-installer-1.2.0.GA.jar
-]]></programlisting>
-<para>This will start the installation wizard and in the first screen you will be proposed to choose a language for install
- instructions. This screen only selects the language that the installer will display choices in and has no effect on the
-language used by JBoss or the applications deployed in JBoss.</para>
-<figure>
-<title>The installer language selection screen</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/chooselanguage.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
+<para>It does not matter where on your system you install JBoss. Note, however, that installing JBoss into a directory that has a name containing spaces causes problems in some situations with Sun-based VMs. So try to avoid using installation folders that have spaces in their names.</para>
+<para>There is no requirement for root access to run JBoss on UNIX/Linux systems because none of the default ports are within the 0-1023 privileged port range.</para>
<orderedlist continuation="continues">
-<listitem><para>Choose preferred language and click OK. In the next two dialogs click the Next button.</para></listitem>
-<listitem><para>In the following window accept the license agreement and press the Next button.</para></listitem>
+<listitem><para>After you have the binary archive you want to install, use the JDK jar tool (or any other ZIP extraction tool) to extract the jboss-4.2.1.zip archive contents into a location of your choice. The jboss-4.2.1.tgz archive is a gzipped tar file that requires a gnutar compatible tar which can handle the long pathnames in the archive. The extraction process will create a jboss-4.2.1 directory. </para></listitem>
</orderedlist>
-<figure>
-<title>Accepting the license</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/licenseagreement.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<para>The installer will ask for the directory to use for the installation. The installer does not write the installation directory into any of the scripts or into any form of registry, so you will be free to move or rename the JBoss installation directory after installation. On Linux platform installation directories that contains spaces can cause problems, so we recommend sticking to simple directory names.</para>
-<orderedlist continuation="continues">
-<listitem><para>Choose the place where JBoss server will be installed and click Next.</para></listitem>
-</orderedlist>
-
-<figure>
-<title>Selecting the installation directory</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/choosinglocation.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<orderedlist continuation="continues">
-<listitem><para>On the next step you are able to select the starting server configuration set.</para></listitem>
-</orderedlist>
-
-<figure>
-<title>Selecting the installation group</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/ejbprofile.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<para>The starting configuration determines which sets of packages are available for installation. After selecting the configuration set, you have the option to further customize the installation, customizing the set of services installed.
-The next screen shows the package selection screen. The installer knows the dependencies between services and will not allow
- you to configure services in an incompatible way. This is much safer than the trial and error approach of configuring
-services by hand from a raw ZIP install. When choosing configuration sets, be aware that you can not add packages that are
-not a part of the selected configuration set. If you wanted a simple web container (the tomcat configuration) that also had
-JMS support (the jms configuration), it would be necessary to go to a larger configuration, such as the default configuration,
- and remove the unwanted packages. There are some combinations of JEMS components that are not supported directly through the
- installer.</para>
-<orderedlist continuation="continues">
-<listitem><para>Choose packs you want to be installed and click Next.</para></listitem>
-</orderedlist>
-
-<figure>
-<title>Selecting the packages to install</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/selectingpacks.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<orderedlist continuation="continues">
-<listitem><para>Then select installation type (advanced or standard):</para></listitem>
-</orderedlist>
-
-<figure>
-<title>Selecting installation type</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/installationtype.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-<para>When all this is done you will be asked to confirm your installation.</para>
-<orderedlist continuation="continues">
-<listitem><para>Click the Next button to start installation.</para></listitem>
-</orderedlist>
-<orderedlist continuation="continues">
-<listitem><para>After installation process is complete click the button Next > Done.</para></listitem>
-</orderedlist>
-<para>That's it. JBoss server is installed. Your JBoss installation can be found in the directory that you specified at
-the beginning of the install. The installer image may contain different services than the archive distribution, depending on
- the type of installation performed. However, the basic structure and layout of all JBoss instances are the same.</para>
-<para>Now you should add JBoss AS to server manager in Red Hat Developer Studio.</para>
</section>
<section id="AddingJBossServer">
@@ -222,7 +132,7 @@
<orderedlist>
<listitem><para>Open the JBoss Server View by selecting Window > Show View > Other > Server > JBoss Server View. You will see JBoss Server view.</para></listitem>
<listitem><para>Right click anywhere in this view and select New Server.</para></listitem>
-<listitem><para>Select JBoss, a division of Red Hat > JBoss AS 4.0 and press Next.</para></listitem>
+<listitem><para>Select JBoss > JBoss v4.2 and press Next.</para></listitem>
</orderedlist>
<figure>
<title>Selecting server type</title>
@@ -234,7 +144,7 @@
</figure>
<orderedlist continuation="continues">
-<listitem><para>In the next step locate the place where you have installed the server, locate its home directory and define JRE.</para></listitem>
+<listitem><para>In the next step make Red Hat Developer Studio to know where you have installed the server and define JRE.</para></listitem>
</orderedlist>
<figure>
<title>Defining JBoss Runtime</title>
@@ -249,19 +159,8 @@
<para>When adding a new server you will need to specify what JRE to use. It is important to set this value to a full JDK, not JRE. Again, you need a full JDK to run Web applications, JRE will not be enough.</para>
</note>
<orderedlist continuation="continues">
- <listitem><para>In the following window give a name to a new server. After that press Next.</para></listitem>
- </orderedlist>
- <figure>
-<title>Defining JBoss Server Name</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossname.png"/>
- </imageobject>
-</mediaobject>
-</figure>
-
-
-<orderedlist continuation="continues">
+ <listitem><para>In the following window leave all settings default and press Next button.</para></listitem>
+
<listitem><para>In the last wizard's dialog modify the projects that are configured on the server and click Finish.</para></listitem>
</orderedlist>
<figure>
18 years, 5 months