JBoss Tools SVN: r3608 - in trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-13 09:55:43 -0400 (Thu, 13 Sep 2007)
New Revision: 3608
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLDoctypeHyperlink.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLRootHyperlinkPartitioner.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/TextScanner.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLDoctypeHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLDoctypeHyperlink.java 2007-09-13 13:51:44 UTC (rev 3607)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLDoctypeHyperlink.java 2007-09-13 13:55:43 UTC (rev 3608)
@@ -10,12 +10,14 @@
******************************************************************************/
package org.jboss.tools.common.text.ext.hyperlink.xml;
+import org.eclipse.jdt.internal.core.ModelUpdater;
import org.eclipse.jface.text.IRegion;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Node;
+import org.jboss.tools.common.text.ext.ExtensionsPlugin;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
import org.jboss.tools.common.text.ext.util.Utils;
@@ -42,7 +44,9 @@
String text = "";
try {
text = getDocument().get(start, end - start);
- } catch (Exception x) {};
+ } catch (Exception x) {
+ ExtensionsPlugin.getPluginLog().logError(x);
+ };
String publicId = (node.getPublicId() == null ? "" : node.getPublicId());
String systemId = (node.getSystemId() == null ? "" : node.getSystemId());
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLRootHyperlinkPartitioner.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLRootHyperlinkPartitioner.java 2007-09-13 13:51:44 UTC (rev 3607)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLRootHyperlinkPartitioner.java 2007-09-13 13:55:43 UTC (rev 3608)
@@ -19,6 +19,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.jboss.tools.common.text.ext.ExtensionsPlugin;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
@@ -76,6 +77,7 @@
}
}
} catch (Exception x) {
+ ExtensionsPlugin.getPluginLog().logError(x);
} finally {
smw.dispose();
}
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/TextScanner.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/TextScanner.java 2007-09-13 13:51:44 UTC (rev 3607)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/TextScanner.java 2007-09-13 13:55:43 UTC (rev 3608)
@@ -222,6 +222,7 @@
count++;
}
} catch (BadLocationException ex) {
+ //ignore
}
return count;
}
16 years, 9 months
JBoss Tools SVN: r3607 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common: editor/form and 20 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-13 09:51:44 -0400 (Thu, 13 Sep 2007)
New Revision: 3607
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/XMLEditorLauncher.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/SaveModelActionDelegate.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/ModelResourceActionDelegate.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/RemoveModelNatureActionDelegate.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TableStructuredFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dialog/SelectEclipseFileWizard.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd/ControlDragDrop.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/PropertiesWizard.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/outline/OutlineContentProvider.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/outline/XModelObjectContentProvider.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/problem/ResourceProblemManager.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/SelectObjectWizard.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/XModelObjectSelectionProvider.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/TextEditorComponent.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/preferences/ReplaceTabsAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/preferences/TabWidthAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteInsertHelper.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/editor/PaletteDialog.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/model/PaletteModel.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizard/newfile/NewXHTMLFileWizard.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/bundlemodel/BundleModel.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -129,7 +129,11 @@
private void updateFile() {
IFile file = getFile();
- if(file != null) try { file.refreshLocal(0, null); } catch (Exception e) {}
+ if(file != null) try {
+ file.refreshLocal(0, null);
+ } catch (CoreException e) {
+ //ignore
+ }
}
private IFile getFile() {
@@ -161,21 +165,26 @@
try {
String q = p.getPersistentProperty(qn);
selectedPageIndex = (q == null) ? 0 : Integer.parseInt(q);
- } catch (Exception e) {
+ } catch (NumberFormatException e) {
//ignore
selectedPageIndex = 0;
+ } catch (CoreException e) {
+ //ignore
+ selectedPageIndex = 0;
}
}
private void saveSelectedTab() {
IFile file = getFile();
- try {
if(file == null) {
saveSelectedTabForStorage();
} else {
- file.setPersistentProperty(persistentTabQualifiedName, "" + selectedPageIndex);
+ try {
+ if(file.isAccessible()) file.setPersistentProperty(persistentTabQualifiedName, "" + selectedPageIndex);
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
- } catch (Exception e) {}
}
private void saveSelectedTabForStorage() {
@@ -185,7 +194,7 @@
if(p == null || !p.isOpen()) return;
try {
p.setPersistentProperty(qn, "" + selectedPageIndex);
- } catch (Exception e) {
+ } catch (CoreException e) {
//ignore
}
}
@@ -223,7 +232,9 @@
try {
setActivePage(selectedPageIndex);
updateSelectionProvider();
- } catch (Exception e) {}
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
new ResourceChangeListener(this, getContainer());
}
@@ -236,7 +247,9 @@
selectedPageIndex = i;
try {
switchToPage(i);
- } catch (Exception e) {}
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
}
@@ -545,7 +558,11 @@
Display.getDefault().syncExec(
new Runnable() {
public void run() {
- try { Thread.sleep(200); } catch (Exception e) {}
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ //ignore
+ }
textEditor.save();
}
}
@@ -886,6 +903,7 @@
new ProgressMonitorDialog(shell).run(false, true, op);
success = true;
} catch (InterruptedException x) {
+ //ignore
} catch (InvocationTargetException x) {
Throwable targetException= x.getTargetException();
String title = "Save As";
@@ -913,7 +931,11 @@
XModelObject o = null;
for (int i = 0; i < 5 && o == null; i++) {
o = EclipseResourceUtil.getObjectByResource(file);
- if(o == null) try { Thread.sleep(200); } catch (Exception e) {}
+ if(o == null) try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ //ignore
+ }
}
if(o == null) o = EclipseResourceUtil.createObjectForResource(file);
if(o != null) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/XMLEditorLauncher.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/XMLEditorLauncher.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/XMLEditorLauncher.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -63,7 +63,11 @@
int time = 100;
while(workbenchPage.findEditor(input) != null) {
if(time > 1000) return;
- try { Thread.sleep(time); } catch (Exception e) {}
+ try {
+ Thread.sleep(time);
+ } catch (InterruptedException e) {
+ //ignore
+ }
time *= 2;
}
try {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -14,6 +14,7 @@
import java.util.StringTokenizer;
import org.jboss.tools.common.editor.ErrorSelectionListener;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.MouseAdapter;
@@ -28,6 +29,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Layout;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.forms.ExpandableForm;
import org.jboss.tools.common.model.ui.widgets.IWidgetSettings;
@@ -221,18 +223,24 @@
public StyleRange2(int start, int length, Color fg, Color bg, String location) {
super(start, length, fg, bg);
int i = location.indexOf(":");
- try {
- line = Integer.parseInt(location.substring(0, i));
- } catch (Exception e) {}
- try {
- position = Integer.parseInt(location.substring(i + 1));
- } catch (Exception e) {}
+ line = getInt(location.substring(0, i), 0);
+ position = getInt(location.substring(i + 1), 0);
}
public void execute() {
if(listener != null) listener.errorSelected(line, position);
}
}
+ int getInt(String s, int def) {
+ if(s == null || s.length() == 0) return def;
+ try {
+ return Integer.parseInt(s);
+ } catch (NumberFormatException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
+ return def;
+ }
+
class ML extends MouseAdapter implements MouseMoveListener {
Cursor hand = new Cursor(null, SWT.CURSOR_HAND);
Cursor arrow = new Cursor(null, SWT.CURSOR_ARROW);
@@ -256,8 +264,10 @@
int offset = 0;
try {
offset = styledText.getOffsetAtLocation(new Point(e.x, e.y));
- } catch (Exception exc) {
+ } catch (SWTException exc) {
return null;
+ } catch (IllegalArgumentException e2) {
+ return null;
}
return getRange(offset);
}
@@ -315,11 +325,6 @@
result[ERROR_TYPE] = s.substring(0, i);
result[ERROR_LOCATION] = q;
result[ERROR_MESSAGE] = s.substring(k + 1);
-// int qi = q.indexOf(':');
-// if(qi > 0) {
-// try { line = Integer.parseInt(q.substring(0, qi)); } catch (Exception e) {}
-// try { position = Integer.parseInt(q.substring(qi + 1)); } catch (Exception e) {}
-// }
} else {
result[ERROR_TYPE] = "ERROR";
result[ERROR_LOCATION] = "0:0";
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/SaveModelActionDelegate.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/SaveModelActionDelegate.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/SaveModelActionDelegate.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -17,6 +17,7 @@
import org.jboss.tools.common.meta.action.impl.handlers.SaveAllHandler;
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.impl.RootImpl;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
public class SaveModelActionDelegate extends AbstractModelActionDelegate {
ModifyUpdate update = null;
@@ -36,7 +37,11 @@
XModel model = (object != null) ? object.getModel() : null;
update.setData(action, model);
synchronized (monitor) {
- try { monitor.notifyAll(); } catch (Exception e) {}
+ try {
+ monitor.notifyAll();
+ } catch (IllegalMonitorStateException e) {
+ //ignore
+ }
}
}
@@ -48,7 +53,11 @@
if(update != null) {
update.stopped = true;
synchronized (monitor) {
- try { monitor.notifyAll(); } catch (Exception e) {}
+ try {
+ monitor.notifyAll();
+ } catch (IllegalMonitorStateException e) {
+ //ignore
+ }
}
update = null;
}
@@ -92,12 +101,18 @@
public void run() {
while(!stopped) {
synchronized (monitor) {
- try { monitor.wait(); } catch (Exception e) {}
+ try {
+ monitor.wait();
+ } catch (InterruptedException e) {
+ //ignore
+ }
if(stopped) return;
if(action != null) try {
boolean enabled = model != null && model.getRoot().isModified();
if(action.isEnabled() != enabled) action.setEnabled(enabled);
- } catch (Exception e) {}
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -96,9 +96,10 @@
w.execute();
}
} catch (ActionDeclinedException de) {
+ //ignore
} catch(Exception e) {
ModelUIPlugin.getPluginLog().logError(e);
- }
+ }
}
protected Properties prepareProperties() {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/ModelResourceActionDelegate.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/ModelResourceActionDelegate.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/ModelResourceActionDelegate.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -145,7 +145,9 @@
if(isSupportingImplementation(IFile.class)) {
try {
resource = ((IClassFile)object).getCorrespondingResource();
- } catch (Exception e) {}
+ } catch (Exception e) {
+ //ignore
+ }
} else if(isWindowAction && isSupportingImplementation(IJavaProject.class)) {
object = ((IClassFile)object).getJavaProject();
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/RemoveModelNatureActionDelegate.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/RemoveModelNatureActionDelegate.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/RemoveModelNatureActionDelegate.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -12,6 +12,8 @@
import java.util.*;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
public class RemoveModelNatureActionDelegate extends ProjectRootActionDelegate {
protected String getActionPath() {
@@ -25,10 +27,12 @@
protected boolean hasModelNature(IProject project) {
String nature = getModelNatureName();
- if(nature == null) return super.hasModelNature(project);
+ if(nature == null) return super.hasModelNature(project);
+ if(project == null || !project.isAccessible()) return false;
try {
if(project.hasNature(nature)) return true;
- } catch (Exception e) {
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
return false;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -38,6 +38,7 @@
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWTException;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.graphics.Color;
@@ -141,10 +142,8 @@
int dw = (w - cw) * getWidthHint(i) / hs;
try {
c.setWidth(c.getWidth() + dw);
-
-
-
- } catch (Exception exc) {
+ } catch (SWTException exc) {
+ //ignore
}
}
resizeLock = false;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TableStructuredFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TableStructuredFieldEditor.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TableStructuredFieldEditor.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -336,17 +336,20 @@
// IStructureChangeListener
public void structureChanged(StructuredChangedEvent event) {
- if (this.tableViewer!=null) {
- try {
- int i = tableViewer.getTable().getSelectionIndex();
- if(i < 0) i = 0;
- tableViewer.refresh();
- int c = tableViewer.getTable().getItemCount();
- while(i >= c) --i;
- if(i >= 0) {
- tableViewer.setSelection(new StructuredSelection(tableViewer.getTable().getItem(i).getData()));
- }
- } catch (Exception e) {}
+ if(tableViewer == null) return;
+ Table table = tableViewer.getTable();
+ if(table == null || table.isDisposed()) return;
+ int i = table.getSelectionIndex();
+ if(i < 0) i = 0;
+ try {
+ tableViewer.refresh();
+ int c = tableViewer.getTable().getItemCount();
+ while(i >= c) --i;
+ if(i >= 0) {
+ tableViewer.setSelection(new StructuredSelection(tableViewer.getTable().getItem(i).getData()));
+ }
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dialog/SelectEclipseFileWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dialog/SelectEclipseFileWizard.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dialog/SelectEclipseFileWizard.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -14,6 +14,7 @@
import java.util.List;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.wizards.one.ServiceDialogImpl;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
@@ -178,6 +179,7 @@
}
private boolean collect(IContainer container, Set<IResource> set) {
+ if(container == null || !container.isAccessible()) return false;
boolean added = false;
try {
IResource[] resources = container.members();
@@ -197,6 +199,7 @@
}
}
} catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
return added;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd/ControlDragDrop.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd/ControlDragDrop.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd/ControlDragDrop.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -133,7 +133,11 @@
public void run() {
while(status == 1) {
- try { Thread.sleep(200); } catch (Exception e) {}
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ ignore();
+ }
long t = System.currentTimeMillis();
if(item != null && t > item_time) {
expandPending = true;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/PropertiesWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/PropertiesWizard.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/PropertiesWizard.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -77,8 +77,10 @@
public void stopEditing() {
try {
- objectEditor.stopEditing();
- } catch (Exception e) {}
+ if(objectEditor != null) objectEditor.stopEditing();
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
public void dispose() {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/outline/OutlineContentProvider.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/outline/OutlineContentProvider.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/outline/OutlineContentProvider.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -37,21 +37,6 @@
return es2;
}
-/*
- private void createFilteredTree() {
- XModel model = cache.getObject().getModel();
- if(EclipseResourceUtil.isProjectFragment(model)) return;
- String classname = model.getMetaData().getMapping("FilteredTrees").getValue("FileSystems");
- try {
- tree = (XFilteredTree)getClass().getClassLoader().loadClass(classname).newInstance();
- tree.setModel(model);
- if(tree.getRoot() == null) tree = null;
- isProjectEnabled = (tree != null);
- } catch(Exception ex) {
- }
- }
-*/
-
public Object[] getChildren(Object parentElement) {
Object result[] = null;
if(cache.getObject() == parentElement || tree == null)
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/outline/XModelObjectContentProvider.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/outline/XModelObjectContentProvider.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/outline/XModelObjectContentProvider.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -16,8 +16,8 @@
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.jboss.tools.common.model.XFilteredTreeConstraint;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.util.*;
public class XModelObjectContentProvider extends WorkbenchContentProvider {
@@ -34,6 +34,7 @@
((TreeViewer)viewer).expandToLevel(2);
if(cache != null) viewer.setSelection(new StructuredSelection(cache.getObject()));
} catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
}
}
@@ -100,19 +101,19 @@
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ super.inputChanged(viewer, oldInput, newInput);
+ this.viewer = viewer;
+ if(viewer instanceof TreeViewer) {
+ ((TreeViewer)viewer).setAutoExpandLevel(2);
+ }
+ if(viewer == null || viewer.getControl() == null || viewer.getControl().isDisposed()) return;
try {
- super.inputChanged(viewer, oldInput, newInput);
- this.viewer = viewer;
- if(viewer instanceof TreeViewer) {
- ((TreeViewer)viewer).setAutoExpandLevel(2);
- }
- if(viewer.getControl() == null || viewer.getControl().isDisposed()) return;
viewer.refresh();
if(viewer.getSelection() == null || viewer.getSelection().isEmpty()) {
if(cache != null) viewer.setSelection(new StructuredSelection(cache.getObject()));
}
} catch (Exception t) {
- //ignore
+ ModelUIPlugin.getPluginLog().logError(t);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/problem/ResourceProblemManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/problem/ResourceProblemManager.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/problem/ResourceProblemManager.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -101,7 +101,11 @@
int line = marker.getAttribute(IMarker.LINE_NUMBER, -1);
int position = marker.getAttribute(IMarker.CHAR_START, -1);
String type = IMarker.PROBLEM;
- try { type = marker.getType(); } catch (Exception e) {}
+ try {
+ if(marker.exists()) type = marker.getType();
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
Problem p = new Problem(message, position, line, -1);
p.setType(type);
p.setLocation(location);
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -13,7 +13,6 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
@@ -227,10 +226,12 @@
*/
private byte[] getEclipseLogContent() {
StringBuffer sb = new StringBuffer();
+ String location = Platform.getLogFileLocation().toOSString();
+ File f = new File(location);
+ if(!f.isFile()) return sb.toString().getBytes();
try {
- InputStreamReader in = new FileReader(Platform.getLogFileLocation()
- .toOSString());
+ InputStreamReader in = new FileReader(location);
char[] tempBuffer = new char[512];
int len = 0;
@@ -238,8 +239,8 @@
sb.append(tempBuffer);
}
- } catch (FileNotFoundException e) {
} catch (IOException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
return sb.toString().getBytes();
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/resources/ResourceLayoutManager.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -94,7 +94,7 @@
private Document getLayoutDocument(IResource resource) {
Document document = null;
- if (resource==null) {
+ if (resource == null) {
ModelUIPlugin.getPluginLog().logError(ModelUIMessages.getString(ERROR_RESOURCE_NULL));
return null;
}
@@ -102,9 +102,13 @@
String fullResourceLocation = getFullLocation(resource).toString();
String layoutLocation = null;
try {
- layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
- } catch (CoreException e) {}
- if (layoutLocation==null) layoutLocation = createNewLayoutLocation(resource);
+ if(resource.isAccessible()) {
+ layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
+ }
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
+ if (layoutLocation == null) layoutLocation = createNewLayoutLocation(resource);
//String fullLayoutLocation = getFullLocation(resource).addFileExtension(LAYOUT_EXT).toString();
// try get from hashMap
@@ -160,9 +164,13 @@
getFullLocation(resource).toString();
String layoutLocation = null;
try {
- layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
- } catch (CoreException e) {}
- if (layoutLocation==null) layoutLocation = createNewLayoutLocation(resource);
+ if(resource != null && resource.isAccessible()) {
+ layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
+ }
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
+ if (layoutLocation == null) layoutLocation = createNewLayoutLocation(resource);
if(!new File(layoutLocation).isFile()) return null;
//String fullLayoutLocation = getFullLocation(resource).addFileExtension(LAYOUT_EXT).toString();
Document document = null;
@@ -204,8 +212,12 @@
public void store(IResource resource) {
String layoutLocation = null;
try {
- layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
- } catch (CoreException e) {}
+ if(resource != null && resource.isAccessible()) {
+ layoutLocation = resource.getPersistentProperty(new QualifiedName("",LAYOUT_PROPERTY));
+ }
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
if (layoutLocation==null) {
layoutLocation = createNewLayoutLocation(resource);
}
@@ -260,8 +272,12 @@
String layoutLocation = getPluginMetadataPath().toString();
String result = layoutLocation+"/"+fileName+"."+LAYOUT_EXT;
try {
- resource.setPersistentProperty(new QualifiedName("", LAYOUT_PROPERTY), result);
- } catch (CoreException e) {}
+ if(resource != null && resource.isAccessible()) {
+ resource.setPersistentProperty(new QualifiedName("", LAYOUT_PROPERTY), result);
+ }
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
return result;
}
@@ -272,4 +288,5 @@
return INSTANCE;
}
}
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/SelectObjectWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/SelectObjectWizard.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/SelectObjectWizard.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -102,7 +102,11 @@
if(getSelection(navigatorpart) == o
// Actually, this is next to never show WebProjectsView.
&& where == FindObjectHelper.IN_NAVIGATOR_ONLY) {
- try { page.showView(views[i]); } catch (Exception e) {}
+ try {
+ page.showView(views[i]);
+ } catch (PartInitException e) {
+ //ignore
+ }
}
}
return of;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/XModelObjectSelectionProvider.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/XModelObjectSelectionProvider.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/XModelObjectSelectionProvider.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -16,6 +16,7 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jface.viewers.*;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
public class XModelObjectSelectionProvider implements ISelectionProvider, ISelectionChangedListener {
private List<ISelectionChangedListener> listeners;
@@ -55,7 +56,9 @@
if(this.host != null) {
try {
host.removeSelectionChangedListener(this);
- } catch (Exception e) {}
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
this.host = host;
if(host != null)
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -18,9 +18,12 @@
import org.jboss.tools.common.propertieseditor.text.*;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.texteditors.propertyeditor.PropertiesTextEditorStub;
+import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextListener;
import org.eclipse.jface.text.TextEvent;
+import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
@@ -88,9 +91,13 @@
public String getText() {
String text = null;
+ if(getSourceViewer() == null) return null;
+ if(getSourceViewer().getDocument() == null) return null;
try {
text = getSourceViewer().getDocument().get();
- } catch (Exception ex) {}
+ } catch (Exception ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
+ }
return (text == null) ? "" : text;
}
@@ -136,10 +143,16 @@
}
public void setCursor(int line, int position) {
+ ISourceViewer sv = getSourceViewer();
+ if(sv == null) return;
+ IDocument d = sv.getDocument();
+ if(d == null) return;
try {
- int i = getSourceViewer().getDocument().getLineOffset(line - 1) + position -1;
- getSourceViewer().setSelectedRange(i, 0);
- } catch (Exception e) {}
+ int i = d.getLineOffset(line - 1) + position - 1;
+ sv.setSelectedRange(i, 0);
+ } catch (BadLocationException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
public void doSaveAs() {}
@@ -185,7 +198,11 @@
Display.getDefault().syncExec(
new Runnable() {
public void run() {
- try { Thread.sleep(200); } catch (Exception e) {}
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ //ignore
+ }
support.save();
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/TextEditorComponent.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/TextEditorComponent.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/TextEditorComponent.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -167,7 +167,9 @@
String text = null;
try {
if (document != null) text = document.get();
- } catch (Exception ex) {}
+ } catch (Exception ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
+ }
return (text == null) ? "" : text;
}
@@ -193,7 +195,9 @@
try {
int i = document.getLineOffset(line - 1) + position -1;
preview.setSelectedRange(i, 0);
- } catch (Exception e) {}
+ } catch (Exception e) {
+ //ignore
+ }
}
//AbstractTextEditor
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -23,8 +23,10 @@
import org.jboss.tools.common.editor.ObjectTextEditor;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.texteditors.xmleditor.XMLTextEditor;
+import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.TextEvent;
+import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.events.FocusListener;
//import org.eclipse.swt.graphics.Point;
@@ -94,9 +96,15 @@
public String getText() {
String text = null;
+ ISourceViewer sv = getSourceViewer();
+ if(sv == null) return "";
+ IDocument d = sv.getDocument();
+ if(d == null) return "";
try {
- text = getSourceViewer().getDocument().get();
- } catch (Exception ex) {}
+ text = d.get();
+ } catch (Exception ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
+ }
return (text == null) ? "" : text;
}
@@ -150,11 +158,15 @@
}
public void setCursor(int line, int position) {
+ ISourceViewer sv = getSourceViewer();
+ if(sv == null) return;
try {
- int i = getSourceViewer().getDocument().getLineOffset(line - 1) + position -1;
- getSourceViewer().setSelectedRange(i, 0);
- getSourceViewer().revealRange(i, 0);
- } catch (Exception e) {}
+ int i = sv.getDocument().getLineOffset(line - 1) + position -1;
+ sv.setSelectedRange(i, 0);
+ sv.revealRange(i, 0);
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
public void doSaveAs() {
@@ -179,6 +191,7 @@
if(old.isModified()) try {
new DiscardFileHandler().executeHandler(old, new Properties());
} catch (Exception e) {
+ //ignore
// ModelUIPlugin.log(e);
}
}
@@ -229,7 +242,11 @@
Display.getDefault().syncExec(
new Runnable() {
public void run() {
- try { Thread.sleep(200); } catch (Exception e) {}
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ //ignore
+ }
support.save(true);
}
}
@@ -265,7 +282,9 @@
try {
operation.run(getProgressMonitor());
} catch (InterruptedException x) {
+ //ignore
} catch (InvocationTargetException x) {
+ //ignore
}
} else {
@@ -273,6 +292,7 @@
try {
doSetInput(input);
} catch (CoreException x) {
+ //ignore
}
}
}
@@ -319,7 +339,11 @@
int bp = searcher.getStartPosition();
int ep = searcher.getEndPosition();
if(ep >= bp && bp >= 0) {
- try { selectAndReveal(bp, ep - bp); } catch (Exception e) {}
+ try {
+ selectAndReveal(bp, ep - bp);
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
}
@@ -350,19 +374,6 @@
boolean isUpdating = false;
private void updateAnnotationModel() {
- /*
- if(isUpdating) return;
- isUpdating = true;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- try { Thread.sleep(200); } catch (Exception e) {}
- isUpdating = false;
- if(getSourceViewer() == null) return;
- getSourceViewer().getAnnotationModel().disconnect(getSourceViewer().getDocument());
- getSourceViewer().getAnnotationModel().connect(getSourceViewer().getDocument());
- }
- });
- */
}
public void gotoMarker(IMarker marker) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/preferences/ReplaceTabsAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/preferences/ReplaceTabsAdapter.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/preferences/ReplaceTabsAdapter.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -12,6 +12,7 @@
import org.jboss.tools.common.meta.constraint.*;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.text.xml.ui.xpl.BasePreferenceConstants;
public class ReplaceTabsAdapter extends XAdapter {
@@ -30,7 +31,9 @@
if(EditorsPreferencesPage.store == null) return;
try {
EditorsPreferencesPage.store.setValue(PROPERTY, "true".equals(value));
- } catch (Exception e) {}
+ } catch (Exception e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/preferences/TabWidthAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/preferences/TabWidthAdapter.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/preferences/TabWidthAdapter.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -12,6 +12,7 @@
import org.jboss.tools.common.meta.constraint.*;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.text.xml.ui.xpl.BasePreferenceConstants;
public class TabWidthAdapter extends XAdapter {
@@ -30,9 +31,13 @@
if(!o.isActive()) return;
if(EditorsPreferencesPage.store == null) return;
int i = 4;
- try {
- i = Integer.parseInt(value);
- } catch (Exception e) {}
+ if(value != null && value.length() > 0) {
+ try {
+ i = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
+ }
EditorsPreferencesPage.store.setValue(PROPERTY, i);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -286,7 +286,11 @@
Display.getDefault().syncExec(
new Runnable() {
public void run() {
- try { Thread.sleep(200); } catch (Exception e) {}
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ //ignore
+ }
save();
}
}
@@ -617,28 +621,26 @@
}
private int getPosition(int x, int y) {
- try {
- ISourceViewer v = getSourceViewer();
- StyledText t = v.getTextWidget();
- Point pp = t.toControl(x, y);
- x = pp.x;
- y = pp.y;
- int lineIndex = (t.getTopPixel() + y) / t.getLineHeight();
- if (lineIndex >= t.getLineCount()) {
- return t.getCharCount();
- } else {
- int c = 0;
- try {
- c = t.getOffsetAtLocation(new Point(x, y));
- if(c < 0) c = 0;
- } catch (Exception ex) {
- c = t.getOffsetAtLine(lineIndex + 1) -
- (t.getLineDelimiter() == null ? 0 : t.getLineDelimiter().length());
- }
- return c;
+ ISourceViewer v = getSourceViewer();
+ if(v == null) return 0;
+ StyledText t = v.getTextWidget();
+ if(t == null || t.isDisposed()) return 0;
+ Point pp = t.toControl(x, y);
+ x = pp.x;
+ y = pp.y;
+ int lineIndex = (t.getTopPixel() + y) / t.getLineHeight();
+ if (lineIndex >= t.getLineCount()) {
+ return t.getCharCount();
+ } else {
+ int c = 0;
+ try {
+ c = t.getOffsetAtLocation(new Point(x, y));
+ if(c < 0) c = 0;
+ } catch (Exception ex) {
+ c = t.getOffsetAtLine(lineIndex + 1) -
+ (t.getLineDelimiter() == null ? 0 : t.getLineDelimiter().length());
}
- } catch (Exception e) {
- return 0;
+ return c;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteAdapter.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteAdapter.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -14,6 +14,7 @@
import java.util.Properties;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
@@ -77,7 +78,9 @@
try {
selectedTab = ModelUIPlugin.getWorkspace().getRoot().getPersistentProperty(persistentTabQualifiedName);
- } catch (Exception e) {}
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
pane = new ScrolledComposite(composite, SWT.V_SCROLL);
pane.setExpandHorizontal(true);
@@ -260,7 +263,9 @@
if (selectedTab != null) {
ModelUIPlugin.getWorkspace().getRoot().setPersistentProperty(persistentTabQualifiedName, selectedTab);
}
- } catch (Exception e) {}
+ } catch (CoreException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
}
public void setPaletteContents(PaletteContents contents) {
@@ -399,6 +404,8 @@
DnDUtil.paste(o, new Properties());
model.getXModel().saveOptions();
} catch (ActionDeclinedException de) {
+ //ignore - this exception is thrown to inform that user
+ //selected cancel option in dialog.
} catch (Exception e) {
message(e);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteInsertHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteInsertHelper.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteInsertHelper.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -76,7 +76,7 @@
p.put(PROPOPERTY_SELECTION_PROVIDER, selProvider);
insertIntoEditorInternal(doc, p);
} catch (Exception x) {
- //ignore
+ ModelUIPlugin.getPluginLog().logError(x);
}
}
@@ -240,10 +240,11 @@
boolean appendFirstDelimiter = true;
try {
- if (d.getLineOffset(d.getLineOfOffset(offset)) == offset)
+ if (d != null && d.getLength() > offset && offset >= 0
+ && d.getLineOffset(d.getLineOfOffset(offset)) == offset)
appendFirstDelimiter = false; // At start of a line
- } catch (Exception ex) {
- //ignore
+ } catch (BadLocationException ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
}
if (body == null || body.length() == 0) appendFirstDelimiter = false;
@@ -259,7 +260,7 @@
if (lineOffset + lineLength - offset - length == 0)
appendLastDelimiter = false;
} catch (Exception ex) {
-
+ ModelUIPlugin.getPluginLog().logError(ex);
}
final StringBuffer buffer= new StringBuffer();
@@ -404,6 +405,7 @@
if (document.getNumberOfLines() > 1)
return document.getLineDelimiter(0);
} catch (BadLocationException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
return System.getProperty("line.separator"); //$NON-NLS-1$
@@ -411,6 +413,7 @@
private static String getIndentOfFirstLine(IDocument d, int offset) {
String indent = "";
+ if(d == null) return indent;
try {
int line = d.getLineOfOffset(offset);
while (line >= 0) {
@@ -420,18 +423,21 @@
}
line--;
}
- } catch (Exception ex) {
+ } catch (BadLocationException ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
}
return indent;
}
private static String getIndentOfLineOfOffset(IDocument d, int offset) {
String indent = "";
+ if(d == null) return indent;
try {
int line = d.getLineOfOffset(offset);
String lineText = d.get(d.getLineOffset(line), d.getLineLength(line));
return getIndentOfLine(lineText, getLineDelimiter(d));
} catch (Exception ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
}
return indent;
}
@@ -496,9 +502,11 @@
if(defaultPrefix == null || defaultPrefix.length() == 0) return;
IDocument doc = null;
try {
- doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
+ if(editor != null && editor.getDocumentProvider() != null) {
+ doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
+ }
} catch (Exception x) {
- //ignore
+ ModelUIPlugin.getPluginLog().logError(x);
}
applyPrefix(text, doc, tagname, uri, defaultPrefix);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/editor/PaletteDialog.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/editor/PaletteDialog.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/editor/PaletteDialog.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -137,9 +137,7 @@
protected void buttonPressed(int buttonId) {
if(buttonId == IDialogConstants.HELP_ID) {
- try {
- HelpUtil.helpEclipse(PreferenceModelUtilities.getPreferenceModel(), "PaletteEditor");
- } catch (Exception e) {}
+ HelpUtil.helpEclipse(PreferenceModelUtilities.getPreferenceModel(), "PaletteEditor");
} else {
super.buttonPressed(buttonId);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/model/PaletteModel.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/model/PaletteModel.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/model/PaletteModel.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -108,6 +108,7 @@
URL url = new URL(BASE_URL, imagePath + fileName);
return ImageDescriptor.createFromURL(url);
} catch (MalformedURLException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
return ImageDescriptor.getMissingImageDescriptor();
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizard/newfile/NewXHTMLFileWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizard/newfile/NewXHTMLFileWizard.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizard/newfile/NewXHTMLFileWizard.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -12,6 +12,7 @@
import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
import org.jboss.tools.common.model.files.handlers.CreateFileSupport;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.util.ModelFeatureFactory;
public class NewXHTMLFileWizard extends NewFileWizardEx {
@@ -25,7 +26,9 @@
CreateFileSupport support = null;
try {
support = (CreateFileSupport)ModelFeatureFactory.getInstance().createFeatureInstance("org.jboss.tools.jst.web.model.handlers.CreateJSPFileSupport");
- } catch (Exception e) {}
+ } catch (ClassCastException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
if(support == null) {
support = new CreateFileSupport();
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/bundlemodel/BundleModel.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/bundlemodel/BundleModel.java 2007-09-13 13:46:53 UTC (rev 3606)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/bundlemodel/BundleModel.java 2007-09-13 13:51:44 UTC (rev 3607)
@@ -174,7 +174,13 @@
}
ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes());
p.clear();
- try { p.load(is); } catch (Exception e) {}
+ try {
+ p.load(is);
+ } catch (IllegalArgumentException e1) {
+ //ignore
+ } catch (IOException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ }
Enumeration ee = p.keys();
if(ee.hasMoreElements()) {
String key = ee.nextElement().toString();
16 years, 9 months
JBoss Tools SVN: r3606 - branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-09-13 09:46:53 -0400 (Thu, 13 Sep 2007)
New Revision: 3606
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Little fix in <rich:scrollableDataTable> component. Add more row.
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2007-09-13 12:25:43 UTC (rev 3605)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2007-09-13 13:46:53 UTC (rev 3606)
@@ -34,554 +34,563 @@
*/
public class RichFacesScrollableDataTableTemplate extends VpeAbstractTemplate {
- final static String DEFAULT_HEIGHT = "500px";
- final static String DEFAULT_WIDTH = "700px";
- final static String HEADER = "header";
- final static String HEADER_CLASS = "headerClass";
- final static String FOOTER = "footer";
- final static String FOOTER_CLASS = "footerClass";
- final static String CAPTION_CLASS = "captionClass";
- final static String CAPTION_STYLE = "captionStyle";
- final static String SPACE = " ";
+ final static String DEFAULT_HEIGHT = "500px";
+ final static String DEFAULT_WIDTH = "700px";
+ final static String HEADER = "header";
+ final static String HEADER_CLASS = "headerClass";
+ final static String FOOTER = "footer";
+ final static String FOOTER_CLASS = "footerClass";
+ final static String CAPTION_CLASS = "captionClass";
+ final static String CAPTION_STYLE = "captionStyle";
+ final static String SPACE = " ";
+
+ private static int NUM_ROW = 5;
- /**
- * Creates a node of the visual tree on the node of the source tree. This
- * visual node should not have the parent node This visual node can have
- * child nodes.
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceNode
- * The current node of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @return The information on the created node of the visual tree.
- */
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
+ /**
+ * Creates a node of the visual tree on the node of the source tree. This
+ * visual node should not have the parent node This visual node can have
+ * child nodes.
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceNode
+ * The current node of the source tree.
+ * @param visualDocument
+ * The document of the visual tree.
+ * @return The information on the created node of the visual tree.
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
- Element sourceElement = (Element) sourceNode;
+ Element sourceElement = (Element) sourceNode;
- String width = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR);
- String height = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR);
+ String width = sourceElement
+ .getAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR);
+ String height = sourceElement
+ .getAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR);
- nsIDOMElement div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ nsIDOMElement div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- String divStyle = HtmlComponentUtil.HTML_WIDTH_ATTR + " : "
- + (width == null ? DEFAULT_WIDTH : width) + ";"
- + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : "
- + (height == null ? DEFAULT_HEIGHT : height) + ";";
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, divStyle);
- div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-table-scroll");
- nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- ComponentUtil.copyAttributes(sourceNode, table);
- div.appendChild(table);
+ String divStyle = HtmlComponentUtil.HTML_WIDTH_ATTR + " : "
+ + (width == null ? DEFAULT_WIDTH : width) + ";"
+ + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : "
+ + (height == null ? DEFAULT_HEIGHT : height) + ";";
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, divStyle);
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-table-scroll");
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ ComponentUtil.copyAttributes(sourceNode, table);
+ table.removeAttribute("height");
+ div.appendChild(table);
- VpeCreationData creationData = new VpeCreationData(div);
+ VpeCreationData creationData = new VpeCreationData(div);
- ComponentUtil.setCSSLink(pageContext,
- "scrollableDataTable/scrollableDataTable.css",
- "richFacesDataTable");
- String tableClass = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
- table
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-table rich-table "
- + (tableClass == null ? "" : tableClass));
+ ComponentUtil.setCSSLink(pageContext,
+ "scrollableDataTable/scrollableDataTable.css",
+ "richFacesDataTable");
+ String tableClass = sourceElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+ table
+ .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-table rich-table "
+ + (tableClass == null ? "" : tableClass));
- // Encode colgroup definition.
- ArrayList<Element> columns = getColumns(sourceElement);
- int columnsLength = getColumnsCount(sourceElement, columns);
- nsIDOMElement colgroup = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_COLGROUP);
- colgroup.setAttribute(HtmlComponentUtil.HTML_TAG_SPAN, String
- .valueOf(columnsLength));
- table.appendChild(colgroup);
+ // Encode colgroup definition.
+ ArrayList<Element> columns = getColumns(sourceElement);
+ int columnsLength = getColumnsCount(sourceElement, columns);
+ nsIDOMElement colgroup = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_COLGROUP);
+ colgroup.setAttribute(HtmlComponentUtil.HTML_TAG_SPAN, String
+ .valueOf(columnsLength));
+ table.appendChild(colgroup);
- // Encode Caption
- encodeCaption(creationData, sourceElement, visualDocument, table);
+ // Encode Caption
+ encodeCaption(creationData, sourceElement, visualDocument, table);
- // Encode Header
- Element header = ComponentUtil.getFacet(sourceElement, HEADER);
- ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, HEADER);
- if (header != null || !columnsHeaders.isEmpty()) {
- nsIDOMElement thead = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_THEAD);
- table.appendChild(thead);
- String headerClass = (String) sourceElement
- .getAttribute(HEADER_CLASS);
- if (header != null) {
- encodeTableHeaderOrFooterFacet(creationData, thead,
- columnsLength, visualDocument, header,
- "dr-table-header rich-table-header",
- "dr-table-header-continue rich-table-header-continue",
- "dr-table-headercell rich-table-headercell",
- headerClass, HtmlComponentUtil.HTML_TAG_TD);
- }
- if (!columnsHeaders.isEmpty()) {
- nsIDOMElement tr = visualDocument.createElement("tr");
- thead.appendChild(tr);
- String styleClass = encodeStyleClass(null,
- "dr-table-subheader rich-table-subheader", null,
- headerClass);
- if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- styleClass);
+ // Encode Header
+ Element header = ComponentUtil.getFacet(sourceElement, HEADER);
+ ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, HEADER);
+ if (header != null || !columnsHeaders.isEmpty()) {
+ nsIDOMElement thead = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_THEAD);
+ table.appendChild(thead);
+ String headerClass = (String) sourceElement
+ .getAttribute(HEADER_CLASS);
+ if (header != null) {
+ encodeTableHeaderOrFooterFacet(creationData, thead,
+ columnsLength, visualDocument, header,
+ "dr-table-header rich-table-header",
+ "dr-table-header-continue rich-table-header-continue",
+ "dr-table-headercell rich-table-headercell",
+ headerClass, HtmlComponentUtil.HTML_TAG_TD);
+ }
+ if (!columnsHeaders.isEmpty()) {
+ nsIDOMElement tr = visualDocument.createElement("tr");
+ thead.appendChild(tr);
+ String styleClass = encodeStyleClass(null,
+ "dr-table-subheader rich-table-subheader", null,
+ headerClass);
+ if (styleClass != null) {
+ tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ styleClass);
+ }
+ encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
+ columnsHeaders,
+ "dr-table-subheadercell rich-table-subheadercell",
+ headerClass, HEADER, HtmlComponentUtil.HTML_TAG_TD);
+ }
}
- encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
- columnsHeaders,
- "dr-table-subheadercell rich-table-subheadercell",
- headerClass, HEADER, HtmlComponentUtil.HTML_TAG_TD);
- }
- }
- // Encode Footer
- Element footer = ComponentUtil.getFacet(sourceElement, FOOTER);
- ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, FOOTER);
- if (footer != null || !columnsFooters.isEmpty()) {
- nsIDOMElement tfoot = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TFOOT);
- table.appendChild(tfoot);
- String footerClass = (String) sourceElement
- .getAttribute(FOOTER_CLASS);
- if (!columnsFooters.isEmpty()) {
- nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- tfoot.appendChild(tr);
- String styleClass = encodeStyleClass(null,
- "dr-table-subfooter rich-table-subfooter", null,
- footerClass);
- if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- styleClass);
+ // Encode Footer
+ Element footer = ComponentUtil.getFacet(sourceElement, FOOTER);
+ ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, FOOTER);
+ if (footer != null || !columnsFooters.isEmpty()) {
+ nsIDOMElement tfoot = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TFOOT);
+ table.appendChild(tfoot);
+ String footerClass = (String) sourceElement
+ .getAttribute(FOOTER_CLASS);
+ if (!columnsFooters.isEmpty()) {
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ tfoot.appendChild(tr);
+ String styleClass = encodeStyleClass(null,
+ "dr-table-subfooter rich-table-subfooter", null,
+ footerClass);
+ if (styleClass != null) {
+ tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ styleClass);
+ }
+ encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
+ columnsFooters,
+ "dr-table-subfootercell rich-table-subfootercell",
+ footerClass, FOOTER, HtmlComponentUtil.HTML_TAG_TD);
+ }
+ if (footer != null) {
+ encodeTableHeaderOrFooterFacet(creationData, tfoot,
+ columnsLength, visualDocument, footer,
+ "dr-table-footer rich-table-footer",
+ "dr-table-footer-continue rich-table-footer-continue",
+ "dr-table-footercell rich-table-footercell",
+ footerClass, HtmlComponentUtil.HTML_TAG_TD);
+ }
}
- encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
- columnsFooters,
- "dr-table-subfootercell rich-table-subfootercell",
- footerClass, FOOTER, HtmlComponentUtil.HTML_TAG_TD);
- }
- if (footer != null) {
- encodeTableHeaderOrFooterFacet(creationData, tfoot,
- columnsLength, visualDocument, footer,
- "dr-table-footer rich-table-footer",
- "dr-table-footer-continue rich-table-footer-continue",
- "dr-table-footercell rich-table-footercell",
- footerClass, HtmlComponentUtil.HTML_TAG_TD);
- }
- }
- nsIDOMElement tbody = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
- table.appendChild(tbody);
+ nsIDOMElement tbody = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ table.appendChild(tbody);
- // Create mapping to Encode body
- List<Node> children = ComponentUtil.getChildren(sourceElement);
- boolean firstRow = true;
- nsIDOMElement tr = null;
- VpeChildrenInfo trInfo = null;
- for (Node child : children) {
- if (child.getNodeName().endsWith(":column")) {
- String breakBefore = ((Element) child)
- .getAttribute("breakBefore");
- if (breakBefore != null && breakBefore.equalsIgnoreCase("true")) {
- tr = null;
+ // Create mapping to Encode body
+ for (int i = 0; i < NUM_ROW; i++) {
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+ boolean firstRow = true;
+ nsIDOMElement tr = null;
+ VpeChildrenInfo trInfo = null;
+ for (Node child : children) {
+ if (child.getNodeName().endsWith(":column")) {
+ String breakBefore = ((Element) child)
+ .getAttribute("breakBefore");
+ if (breakBefore != null
+ && breakBefore.equalsIgnoreCase("true")) {
+ tr = null;
+ }
+ if (tr == null) {
+ tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ if (firstRow) {
+ tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-table-firstrow rich-table-firstrow");
+ firstRow = false;
+ } else {
+ tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-table-row rich-table-row");
+ }
+ trInfo = new VpeChildrenInfo(tr);
+ tbody.appendChild(tr);
+ creationData.addChildrenInfo(trInfo);
+ }
+ trInfo.addSourceChild(child);
+ } else if (child.getNodeName().endsWith(":columnGroup")) {
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(
+ creationData, (Element) child, visualDocument,
+ tbody);
+ tr = null;
+ } else if (child.getNodeName().endsWith(":subTable")) {
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(
+ creationData, (Element) child, visualDocument,
+ tbody);
+ tr = null;
+ } else {
+ VpeChildrenInfo childInfo = new VpeChildrenInfo(tbody);
+ childInfo.addSourceChild(child);
+ creationData.addChildrenInfo(childInfo);
+ tr = null;
+ }
+ }
}
- if (tr == null) {
- tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- if (firstRow) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-table-firstrow rich-table-firstrow");
- firstRow = false;
- } else {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-table-row rich-table-row");
- }
- trInfo = new VpeChildrenInfo(tr);
- tbody.appendChild(tr);
- creationData.addChildrenInfo(trInfo);
- }
- trInfo.addSourceChild(child);
- } else if (child.getNodeName().endsWith(":columnGroup")) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(
- creationData, (Element) child, visualDocument, tbody);
- tr = null;
- } else if (child.getNodeName().endsWith(":subTable")) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData,
- (Element) child, visualDocument, tbody);
- tr = null;
- } else {
- VpeChildrenInfo childInfo = new VpeChildrenInfo(tbody);
- childInfo.addSourceChild(child);
- creationData.addChildrenInfo(childInfo);
- tr = null;
- }
+
+ return creationData;
}
- return creationData;
- }
+ /**
+ *
+ * @param creationData
+ * @param sourceElement
+ * @param visualDocument
+ * @param table
+ */
+ protected void encodeCaption(VpeCreationData creationData,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement table) {
+ // Encode caption
+ Element captionFromFacet = ComponentUtil.getFacet(sourceElement,
+ HtmlComponentUtil.HTML_TAG_CAPTION);
+ if (captionFromFacet != null) {
+ String captionClass = (String) table.getAttribute(CAPTION_CLASS);
+ String captionStyle = (String) table.getAttribute(CAPTION_STYLE);
- /**
- *
- * @param creationData
- * @param sourceElement
- * @param visualDocument
- * @param table
- */
- protected void encodeCaption(VpeCreationData creationData,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement table) {
- // Encode caption
- Element captionFromFacet = ComponentUtil.getFacet(sourceElement,
- HtmlComponentUtil.HTML_TAG_CAPTION);
- if (captionFromFacet != null) {
- String captionClass = (String) table.getAttribute(CAPTION_CLASS);
- String captionStyle = (String) table.getAttribute(CAPTION_STYLE);
+ nsIDOMElement caption = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_CAPTION);
+ table.appendChild(caption);
+ if (captionClass != null && captionClass.length() > 0) {
+ captionClass = "dr-table-caption rich-table-caption "
+ + captionClass;
+ } else {
+ captionClass = "dr-table-caption rich-table-caption";
+ }
+ caption.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ captionClass);
+ if (captionStyle != null && captionStyle.length() > 0) {
+ caption.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ captionStyle);
+ }
- nsIDOMElement caption = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_CAPTION);
- table.appendChild(caption);
- if (captionClass != null && captionClass.length() > 0) {
- captionClass = "dr-table-caption rich-table-caption "
- + captionClass;
- } else {
- captionClass = "dr-table-caption rich-table-caption";
- }
- caption.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- captionClass);
- if (captionStyle != null && captionStyle.length() > 0) {
- caption.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- captionStyle);
- }
+ VpeChildrenInfo cap = new VpeChildrenInfo(caption);
+ cap.addSourceChild(captionFromFacet);
+ creationData.addChildrenInfo(cap);
+ }
- VpeChildrenInfo cap = new VpeChildrenInfo(caption);
- cap.addSourceChild(captionFromFacet);
- creationData.addChildrenInfo(cap);
}
- }
+ /**
+ *
+ * @param creationData
+ * @param parentTr
+ * @param visualDocument
+ * @param headersOrFooters
+ * @param skinCellClass
+ * @param headerClass
+ * @param facetName
+ * @param element
+ */
+ public static void encodeHeaderOrFooterFacets(VpeCreationData creationData,
+ nsIDOMElement parentTr, nsIDOMDocument visualDocument,
+ ArrayList<Element> headersOrFooters, String skinCellClass,
+ String headerClass, String facetName, String element) {
+ for (Element column : headersOrFooters) {
+ String classAttribute = facetName + "Class";
+ String columnHeaderClass = column.getAttribute(classAttribute);
+ nsIDOMElement td = visualDocument.createElement(element);
+ parentTr.appendChild(td);
+ String styleClass = encodeStyleClass(null, skinCellClass,
+ headerClass, columnHeaderClass);
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ td.setAttribute("scop", "col");
+ String colspan = column
+ .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
+ if (colspan != null && colspan.length() > 0) {
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, colspan);
+ }
+ Element facetBody = ComponentUtil.getFacet(column, facetName);
- /**
- *
- * @param creationData
- * @param parentTr
- * @param visualDocument
- * @param headersOrFooters
- * @param skinCellClass
- * @param headerClass
- * @param facetName
- * @param element
- */
- public static void encodeHeaderOrFooterFacets(VpeCreationData creationData,
- nsIDOMElement parentTr, nsIDOMDocument visualDocument,
- ArrayList<Element> headersOrFooters, String skinCellClass,
- String headerClass, String facetName, String element) {
- for (Element column : headersOrFooters) {
- String classAttribute = facetName + "Class";
- String columnHeaderClass = column.getAttribute(classAttribute);
- nsIDOMElement td = visualDocument.createElement(element);
- parentTr.appendChild(td);
- String styleClass = encodeStyleClass(null, skinCellClass,
- headerClass, columnHeaderClass);
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
- td.setAttribute("scop", "col");
- String colspan = column
- .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
- if (colspan != null && colspan.length() > 0) {
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, colspan);
- }
- Element facetBody = ComponentUtil.getFacet(column, facetName);
-
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
+ VpeChildrenInfo child = new VpeChildrenInfo(td);
+ child.addSourceChild(facetBody);
+ creationData.addChildrenInfo(child);
+ }
}
- }
- /**
- *
- * @param creationData
- * @param parentTheadOrTfood
- * @param columns
- * @param visualDocument
- * @param facetBody
- * @param skinFirstRowClass
- * @param skinRowClass
- * @param skinCellClass
- * @param facetBodyClass
- * @param element
- */
- protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData,
- nsIDOMElement parentTheadOrTfood, int columns,
- nsIDOMDocument visualDocument, Element facetBody,
- String skinFirstRowClass, String skinRowClass,
- String skinCellClass, String facetBodyClass, String element) {
- boolean isColumnGroup = facetBody.getNodeName()
- .endsWith(":columnGroup");
- boolean isSubTable = facetBody.getNodeName().endsWith(":subTable");
- if (isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData,
- facetBody, visualDocument, parentTheadOrTfood);
- } else if (isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData,
- facetBody, visualDocument, parentTheadOrTfood);
- } else {
- nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- parentTheadOrTfood.appendChild(tr);
+ /**
+ *
+ * @param creationData
+ * @param parentTheadOrTfood
+ * @param columns
+ * @param visualDocument
+ * @param facetBody
+ * @param skinFirstRowClass
+ * @param skinRowClass
+ * @param skinCellClass
+ * @param facetBodyClass
+ * @param element
+ */
+ protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData,
+ nsIDOMElement parentTheadOrTfood, int columns,
+ nsIDOMDocument visualDocument, Element facetBody,
+ String skinFirstRowClass, String skinRowClass,
+ String skinCellClass, String facetBodyClass, String element) {
+ boolean isColumnGroup = facetBody.getNodeName()
+ .endsWith(":columnGroup");
+ boolean isSubTable = facetBody.getNodeName().endsWith(":subTable");
+ if (isColumnGroup) {
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData,
+ facetBody, visualDocument, parentTheadOrTfood);
+ } else if (isSubTable) {
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData,
+ facetBody, visualDocument, parentTheadOrTfood);
+ } else {
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ parentTheadOrTfood.appendChild(tr);
- String styleClass = encodeStyleClass(null, skinFirstRowClass,
- facetBodyClass, null);
- if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
- }
- String style = ComponentUtil.getHeaderBackgoundImgStyle();
- tr.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ String styleClass = encodeStyleClass(null, skinFirstRowClass,
+ facetBodyClass, null);
+ if (styleClass != null) {
+ tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ }
+ String style = ComponentUtil.getHeaderBackgoundImgStyle();
+ tr.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
- nsIDOMElement td = visualDocument.createElement(element);
- tr.appendChild(td);
+ nsIDOMElement td = visualDocument.createElement(element);
+ tr.appendChild(td);
- styleClass = encodeStyleClass(null, skinCellClass, facetBodyClass,
- null);
- if (styleClass != null) {
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
- }
+ styleClass = encodeStyleClass(null, skinCellClass, facetBodyClass,
+ null);
+ if (styleClass != null) {
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ }
- if (columns > 0) {
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, String
- .valueOf(columns));
- }
- td.setAttribute(HtmlComponentUtil.HTML_SCOPE_ATTR, HtmlComponentUtil.HTML_TAG_COLGROUP);
+ if (columns > 0) {
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, String
+ .valueOf(columns));
+ }
+ td.setAttribute(HtmlComponentUtil.HTML_SCOPE_ATTR,
+ HtmlComponentUtil.HTML_TAG_COLGROUP);
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
+ VpeChildrenInfo child = new VpeChildrenInfo(td);
+ child.addSourceChild(facetBody);
+ creationData.addChildrenInfo(child);
+ }
}
- }
- /**
- *
- * @param parentSourceElement
- * @return list of columns
- */
- public static ArrayList<Element> getColumns(Element parentSourceElement) {
- ArrayList<Element> columns = new ArrayList<Element>();
- NodeList children = parentSourceElement.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if ((child instanceof Element)
- && child.getNodeName().endsWith(":column")) {
- columns.add((Element) child);
- }
+ /**
+ *
+ * @param parentSourceElement
+ * @return list of columns
+ */
+ public static ArrayList<Element> getColumns(Element parentSourceElement) {
+ ArrayList<Element> columns = new ArrayList<Element>();
+ NodeList children = parentSourceElement.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ if ((child instanceof Element)
+ && child.getNodeName().endsWith(":column")) {
+ columns.add((Element) child);
+ }
+ }
+ return columns;
}
- return columns;
- }
- /**
- *
- * @param columns
- * @param facetName
- * @return list of columns with facet
- */
- public static ArrayList<Element> getColumnsWithFacet(
- ArrayList<Element> columns, String facetName) {
- ArrayList<Element> columnsWithFacet = new ArrayList<Element>();
- for (Element column : columns) {
- Element body = ComponentUtil.getFacet(column, facetName);
- if (body != null) {
- columnsWithFacet.add(column);
- }
+ /**
+ *
+ * @param columns
+ * @param facetName
+ * @return list of columns with facet
+ */
+ public static ArrayList<Element> getColumnsWithFacet(
+ ArrayList<Element> columns, String facetName) {
+ ArrayList<Element> columnsWithFacet = new ArrayList<Element>();
+ for (Element column : columns) {
+ Element body = ComponentUtil.getFacet(column, facetName);
+ if (body != null) {
+ columnsWithFacet.add(column);
+ }
+ }
+ return columnsWithFacet;
}
- return columnsWithFacet;
- }
- /**
- *
- * @param parentPredefined
- * @param predefined
- * @param parent
- * @param custom
- * @return
- */
- public static String encodeStyleClass(Object parentPredefined,
- Object predefined, Object parent, Object custom) {
- StringBuffer styleClass = new StringBuffer();
- // Construct predefined classes
- if (null != parentPredefined) {
- styleClass.append(parentPredefined).append(SPACE);
- } else if (null != predefined) {
- styleClass.append(predefined).append(SPACE);
+ /**
+ *
+ * @param parentPredefined
+ * @param predefined
+ * @param parent
+ * @param custom
+ * @return
+ */
+ public static String encodeStyleClass(Object parentPredefined,
+ Object predefined, Object parent, Object custom) {
+ StringBuffer styleClass = new StringBuffer();
+ // Construct predefined classes
+ if (null != parentPredefined) {
+ styleClass.append(parentPredefined).append(SPACE);
+ } else if (null != predefined) {
+ styleClass.append(predefined).append(SPACE);
+ }
+ // Append class from parent component.
+ if (null != parent) {
+ styleClass.append(parent).append(SPACE);
+ }
+ if (null != custom) {
+ styleClass.append(custom);
+ }
+ if (styleClass.length() > 0) {
+ return styleClass.toString();
+ }
+ return null;
}
- // Append class from parent component.
- if (null != parent) {
- styleClass.append(parent).append(SPACE);
- }
- if (null != custom) {
- styleClass.append(custom);
- }
- if (styleClass.length() > 0) {
- return styleClass.toString();
- }
- return null;
- }
- /**
- *
- * @param sourceElement
- * @param columns
- * @return
- */
- protected int getColumnsCount(Element sourceElement,
- ArrayList<Element> columns) {
- int count = 0;
- // check for exact value in component
- Integer span = null;
- try {
- span = Integer.valueOf(sourceElement.getAttribute("columns"));
- } catch (Exception e) {
- // Ignore bad attribute
+ /**
+ *
+ * @param sourceElement
+ * @param columns
+ * @return
+ */
+ protected int getColumnsCount(Element sourceElement,
+ ArrayList<Element> columns) {
+ int count = 0;
+ // check for exact value in component
+ Integer span = null;
+ try {
+ span = Integer.valueOf(sourceElement.getAttribute("columns"));
+ } catch (Exception e) {
+ // Ignore bad attribute
+ }
+ if (null != span && span.intValue() != Integer.MIN_VALUE) {
+ count = span.intValue();
+ } else {
+ // calculate max html columns count for all columns/rows children.
+ count = calculateRowColumns(sourceElement, columns);
+ }
+ return count;
}
- if (null != span && span.intValue() != Integer.MIN_VALUE) {
- count = span.intValue();
- } else {
- // calculate max html columns count for all columns/rows children.
- count = calculateRowColumns(sourceElement, columns);
- }
- return count;
- }
- /*
- * Calculate max number of columns per row. For rows, recursive calculate
- * max length.
- */
- private int calculateRowColumns(Element sourceElement,
- ArrayList<Element> columns) {
- int count = 0;
- int currentLength = 0;
- for (Element column : columns) {
- if (ComponentUtil.isRendered(column)) {
- if (column.getNodeName().endsWith(":columnGroup")) {
- // Store max calculated value of previsous rows.
- if (currentLength > count) {
- count = currentLength;
- }
- // Calculate number of columns in row.
- currentLength = calculateRowColumns(sourceElement,
- getColumns(column));
- // Store max calculated value
- if (currentLength > count) {
- count = currentLength;
- }
- currentLength = 0;
- } else if (column.getNodeName().equals(
- sourceElement.getPrefix() + ":column")) {
- String breakBeforeStr = column.getAttribute("breakBefore");
- boolean breakBefore = false;
- if (breakBeforeStr != null) {
- try {
- breakBefore = Boolean.getBoolean(breakBeforeStr);
- } catch (Exception e) {
- // Ignore bad attribute
+ /*
+ * Calculate max number of columns per row. For rows, recursive calculate
+ * max length.
+ */
+ private int calculateRowColumns(Element sourceElement,
+ ArrayList<Element> columns) {
+ int count = 0;
+ int currentLength = 0;
+ for (Element column : columns) {
+ if (ComponentUtil.isRendered(column)) {
+ if (column.getNodeName().endsWith(":columnGroup")) {
+ // Store max calculated value of previsous rows.
+ if (currentLength > count) {
+ count = currentLength;
+ }
+ // Calculate number of columns in row.
+ currentLength = calculateRowColumns(sourceElement,
+ getColumns(column));
+ // Store max calculated value
+ if (currentLength > count) {
+ count = currentLength;
+ }
+ currentLength = 0;
+ } else if (column.getNodeName().equals(
+ sourceElement.getPrefix() + ":column")) {
+ String breakBeforeStr = column.getAttribute("breakBefore");
+ boolean breakBefore = false;
+ if (breakBeforeStr != null) {
+ try {
+ breakBefore = Boolean.getBoolean(breakBeforeStr);
+ } catch (Exception e) {
+ // Ignore bad attribute
+ }
+ }
+ // For new row, save length of previsous.
+ if (breakBefore) {
+ if (currentLength > count) {
+ count = currentLength;
+ }
+ currentLength = 0;
+ }
+ String colspanStr = column
+ .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
+ Integer colspan = null;
+ try {
+ colspan = Integer.valueOf(colspanStr);
+ } catch (Exception e) {
+ // Ignore
+ }
+ // Append colspan of this column
+ if (null != colspan
+ && colspan.intValue() != Integer.MIN_VALUE) {
+ currentLength += colspan.intValue();
+ } else {
+ currentLength++;
+ }
+ } else if (column.getNodeName().endsWith(":column")) {
+ // UIColumn always have colspan == 1.
+ currentLength++;
+ }
+
}
- }
- // For new row, save length of previsous.
- if (breakBefore) {
- if (currentLength > count) {
- count = currentLength;
- }
- currentLength = 0;
- }
- String colspanStr = column
- .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
- Integer colspan = null;
- try {
- colspan = Integer.valueOf(colspanStr);
- } catch (Exception e) {
- // Ignore
- }
- // Append colspan of this column
- if (null != colspan
- && colspan.intValue() != Integer.MIN_VALUE) {
- currentLength += colspan.intValue();
- } else {
- currentLength++;
- }
- } else if (column.getNodeName().endsWith(":column")) {
- // UIColumn always have colspan == 1.
- currentLength++;
}
-
- }
+ if (currentLength > count) {
+ count = currentLength;
+ }
+ return count;
}
- if (currentLength > count) {
- count = currentLength;
- }
- return count;
- }
- @Override
- public void removeAttribute(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMNode visualNode, Object data, String name) {
- nsIDOMElement visualElement = (nsIDOMElement) visualNode
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_WIDTH_ATTR)) {
- String style = visualElement
- .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- style += "; " + HtmlComponentUtil.HTML_WIDTH_ATTR + " : "
- + DEFAULT_WIDTH + ";";
- visualElement
- .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ @Override
+ public void removeAttribute(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name) {
+ nsIDOMElement visualElement = (nsIDOMElement) visualNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_WIDTH_ATTR)) {
+ String style = visualElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ style += "; " + HtmlComponentUtil.HTML_WIDTH_ATTR + " : "
+ + DEFAULT_WIDTH + ";";
+ visualElement
+ .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
- } else
+ } else
- if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_HEIGHT_ATTR)) {
- String style = visualElement
- .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- style += "; " + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : "
- + DEFAULT_HEIGHT + ";";
- visualElement
- .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_HEIGHT_ATTR)) {
+ String style = visualElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ style += "; " + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : "
+ + DEFAULT_HEIGHT + ";";
+ visualElement
+ .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
- } else {
- visualElement.removeAttribute(name);
+ } else {
+ visualElement.removeAttribute(name);
+ }
}
- }
- @Override
- public void setAttribute(VpePageContext pageContext, Element sourceElement,
- nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data,
- String name, String value) {
- nsIDOMElement visualElement = (nsIDOMElement) visualNode
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_WIDTH_ATTR)) {
- String style = visualElement
- .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- style += "; " + HtmlComponentUtil.HTML_WIDTH_ATTR + " : " + value
- + ";";
- visualElement
- .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ @Override
+ public void setAttribute(VpePageContext pageContext, Element sourceElement,
+ nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data,
+ String name, String value) {
+ nsIDOMElement visualElement = (nsIDOMElement) visualNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_WIDTH_ATTR)) {
+ String style = visualElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ style += "; " + HtmlComponentUtil.HTML_WIDTH_ATTR + " : " + value
+ + ";";
+ visualElement
+ .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
- }
+ }
- if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_HEIGHT_ATTR)) {
- String style = visualElement
- .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- style += "; " + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : " + value
- + ";";
- visualElement
- .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_HEIGHT_ATTR)) {
+ String style = visualElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ style += "; " + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : " + value
+ + ";";
+ visualElement
+ .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ }
+ visualElement.setAttribute(name, value);
}
- visualElement.setAttribute(name, value);
- }
}
\ No newline at end of file
16 years, 9 months
JBoss Tools SVN: r3605 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-13 08:25:43 -0400 (Thu, 13 Sep 2007)
New Revision: 3605
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help/HelpUtil.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help/HelpUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help/HelpUtil.java 2007-09-13 12:01:04 UTC (rev 3604)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help/HelpUtil.java 2007-09-13 12:25:43 UTC (rev 3605)
@@ -87,7 +87,7 @@
}
}
- public static void helpEclipse(XModel model, String key) throws Exception {
+ public static void helpEclipse(XModel model, String key) {
ServiceDialog d = model.getService();
if(!isHelpPluginInstalled()) {
d.showDialog("Help", "User Guide is not installed.", new String[]{"Close"}, null, ServiceDialog.MESSAGE);
16 years, 9 months
JBoss Tools SVN: r3604 - in branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces: template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-09-13 08:01:04 -0400 (Thu, 13 Sep 2007)
New Revision: 3604
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847 Add RichFaces scrollableDataTable template resources
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2007-09-13 11:32:11 UTC (rev 3603)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2007-09-13 12:01:04 UTC (rev 3604)
@@ -110,6 +110,9 @@
/** style */
public static final String HTML_STYLE_ATTR = "style";
+
+ /** scope */
+ public static final String HTML_SCOPE_ATTR = "scope";
/** HTML_TABLE_ATR_ */
public static final String HTML_BORDER_ATTR = "border";
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2007-09-13 11:32:11 UTC (rev 3603)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2007-09-13 12:01:04 UTC (rev 3604)
@@ -355,7 +355,7 @@
td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, String
.valueOf(columns));
}
- td.setAttribute("scope", "colgroup");
+ td.setAttribute(HtmlComponentUtil.HTML_SCOPE_ATTR, HtmlComponentUtil.HTML_TAG_COLGROUP);
VpeChildrenInfo child = new VpeChildrenInfo(td);
child.addSourceChild(facetBody);
@@ -529,7 +529,29 @@
nsIDOMNode visualNode, Object data, String name) {
nsIDOMElement visualElement = (nsIDOMElement) visualNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- visualElement.removeAttribute(name);
+ if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_WIDTH_ATTR)) {
+ String style = visualElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ style += "; " + HtmlComponentUtil.HTML_WIDTH_ATTR + " : "
+ + DEFAULT_WIDTH + ";";
+ visualElement
+ .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+
+ } else
+
+ if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_HEIGHT_ATTR)) {
+ String style = visualElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ style += "; " + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : "
+ + DEFAULT_HEIGHT + ";";
+ visualElement
+ .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+
+ } else {
+ visualElement.removeAttribute(name);
+ }
}
@Override
16 years, 9 months
JBoss Tools SVN: r3603 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-09-13 07:32:11 -0400 (Thu, 13 Sep 2007)
New Revision: 3603
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
Log:
bug on macosx with iflasher was fixed( flasher didn't hide when we swithes to source view from visual view)
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2007-09-13 09:57:20 UTC (rev 3602)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2007-09-13 11:32:11 UTC (rev 3603)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
@@ -81,6 +82,7 @@
"", "splitter_position2");
private static final QualifiedName SPLITTER_POSITION_KEY3 = new QualifiedName(
"", "splitter_position3");
+
private int controlCount = 0;
/** default web-browser */
@@ -352,8 +354,17 @@
case SOURCE_MODE:
selectionBar.showBar(showSelectionBar);
- if (sourceContent != null)
+ if (sourceContent != null) {
sourceContent.setVisible(true);
+
+ //Added by Max Areshkau
+ //was fixed bug(border which drawed by iflasher doesn't hide on MACOS when we swith
+ // to souce view)
+ if(Platform.getOS().equals(Platform.OS_MACOSX)) {
+
+ controller.visualRefresh();
+ }
+ }
if (visualContent != null)
visualContent.setVisible(false);
if (previewContent != null) {
16 years, 9 months
JBoss Tools SVN: r3602 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-13 05:57:20 -0400 (Thu, 13 Sep 2007)
New Revision: 3602
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/ScopePresentationActionProvider.java
Log:
JBIDE-902
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/ScopePresentationActionProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/ScopePresentationActionProvider.java 2007-09-13 08:43:17 UTC (rev 3601)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/ScopePresentationActionProvider.java 2007-09-13 09:57:20 UTC (rev 3602)
@@ -93,12 +93,12 @@
public static void setPackageStructureFlat(boolean s) {
IEclipsePreferences p = SeamPreferences.getInstancePreferences();
- p.put(PACKAGE_STRUCTURE, s ? "flat" : "hierarchical");
+ p.put(PACKAGE_STRUCTURE, s ? PACKAGES_FLAT : PACKAGES_HIERARCHICAL);
}
public static void setScopePresentedAsLabel(boolean s) {
IEclipsePreferences p = SeamPreferences.getInstancePreferences();
- p.put(SCOPE_PRESENTATION, s ? "label" : "node");
+ p.put(SCOPE_PRESENTATION, s ? SCOPE_AS_LABEL : SCOPE_AS_NODE);
}
public void fillActionBars(IActionBars actionBars) {
@@ -106,9 +106,6 @@
actionGroup.fillActionBars(actionBars);
}
- boolean isFlatLayout = true;
- boolean isScopeLable = false;
-
public void dispose() {
super.dispose();
fExtensionSite.getContentService().getActivationService().removeExtensionActivationListener(fMenuUpdater);
@@ -162,19 +159,17 @@
public void saveState(IMemento aMemento) {
super.saveState(aMemento);
- setPackageStructureFlat(isFlatLayout);
- setScopePresentedAsLabel(isScopeLable);
+ setPackageStructureFlat(stateModel.getBooleanProperty(PACKAGE_STRUCTURE));
+ setScopePresentedAsLabel(stateModel.getBooleanProperty(SCOPE_PRESENTATION));
}
void setFlatLayout(boolean b) {
- isFlatLayout = b;
stateModel.setBooleanProperty(PACKAGE_STRUCTURE, b);
actionGroup.setFlatLayout(b);
}
void setScopeLable(boolean b) {
- isScopeLable = b;
stateModel.setBooleanProperty(SCOPE_PRESENTATION, b);
actionGroup.setScopeLable(b);
}
16 years, 9 months
JBoss Tools SVN: r3601 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-09-13 04:43:17 -0400 (Thu, 13 Sep 2007)
New Revision: 3601
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
null pointer check
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-09-13 07:45:41 UTC (rev 3600)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-09-13 08:43:17 UTC (rev 3601)
@@ -1703,17 +1703,18 @@
IProject project = iFile.getProject();
IModelNature nature = EclipseResourceUtil.getModelNature(project);
- XModel model = nature.getModel();
- XModelObject webXML = WebAppHelper.getWebApp(model);
- XModelObject param = WebAppHelper.findWebAppContextParam(webXML, "javax.faces.DEFAULT_SUFFIX");
- if ( param != null ) {
- String value = param.getAttributeValue("param-value");
-
- if ( value.length() != 0 && iFile.getName().endsWith(value)) {
- isFacelet = true;
+ if (nature != null) {
+ XModel model = nature.getModel();
+ XModelObject webXML = WebAppHelper.getWebApp(model);
+ XModelObject param = WebAppHelper.findWebAppContextParam(webXML, "javax.faces.DEFAULT_SUFFIX");
+ if ( param != null ) {
+ String value = param.getAttributeValue("param-value");
+
+ if ( value.length() != 0 && iFile.getName().endsWith(value)) {
+ isFacelet = true;
+ }
}
}
-
}
return isFacelet;
16 years, 9 months
JBoss Tools SVN: r3600 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-13 03:45:41 -0400 (Thu, 13 Sep 2007)
New Revision: 3600
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetFilterSetFactory.java
Log:
fix testNG problem with jndi pattern
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetFilterSetFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetFilterSetFactory.java 2007-09-13 07:27:40 UTC (rev 3599)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetFilterSetFactory.java 2007-09-13 07:45:41 UTC (rev 3600)
@@ -41,7 +41,7 @@
PROJECT_TEMPLATE.addFilter("jbossHome","${jboss.home}");
PROJECT_TEMPLATE.addFilter("hbm2ddl","${hibernate.hbm2ddl.auto}");
PROJECT_TEMPLATE.addFilter("driverJar","${driver.file}");
- PROJECT_TEMPLATE.addFilter("jndiPattern","${project.name}/#{ejbName}/local");
+ PROJECT_TEMPLATE.addFilter("jndiPattern","#{ejbName}/local");
PROJECT_TEMPLATE.addFilter("embeddedEjb","false");
PROJECT_TEMPLATE.addFilter("debug","true");
16 years, 9 months
JBoss Tools SVN: r3599 - trunk/seam/plugins/org.jboss.tools.seam.ui.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-09-13 03:27:40 -0400 (Thu, 13 Sep 2007)
New Revision: 3599
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath
Log:
Cosmetic fix
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath 2007-09-13 01:16:02 UTC (rev 3598)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath 2007-09-13 07:27:40 UTC (rev 3599)
@@ -4,6 +4,5 @@
<classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.swt"/>
<classpathentry kind="output" path="bin"/>
</classpath>
16 years, 9 months