easystruts-cvs Mailing List for EasyStruts (Page 8)
Brought to you by:
eboudrant,
pombredanne
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(39) |
May
(128) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(16) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(22) |
Feb
(21) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:28
|
Update of /cvsroot/easystruts/easystruts-website/web/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/web/templates Log Message: Directory /cvsroot/easystruts/easystruts-website/web/templates added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:27
|
Update of /cvsroot/easystruts/easystruts-website/web-edit/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/web-edit/WEB-INF Log Message: Directory /cvsroot/easystruts/easystruts-website/web-edit/WEB-INF added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:27
|
Update of /cvsroot/easystruts/easystruts-website/web-edit/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/web-edit/images Log Message: Directory /cvsroot/easystruts/easystruts-website/web-edit/images added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:27
|
Update of /cvsroot/easystruts/easystruts-website/web-edit/WEB-INF/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/web-edit/WEB-INF/lib Log Message: Directory /cvsroot/easystruts/easystruts-website/web-edit/WEB-INF/lib added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:26
|
Update of /cvsroot/easystruts/easystruts-website/web-edit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/web-edit Log Message: Directory /cvsroot/easystruts/easystruts-website/web-edit added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/templates Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/templates added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/css In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/css Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/css added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/docs Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/docs added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/examples Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/examples added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/images Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/images added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/menus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/menus Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/x/menus added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4 Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4 added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:16
|
Update of /cvsroot/easystruts/easystruts-website/root In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/root Log Message: Directory /cvsroot/easystruts/easystruts-website/root added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:14
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:14
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/cbe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/cbe Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/cbe added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:14
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:14
|
Update of /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/cbe/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/cbe/docs Log Message: Directory /cvsroot/easystruts/easystruts-website/lib/x-cbe/x3151_cbe4191_z4/cross-browser.com/cbe/docs added to the repository |
From: Philippe O. <pom...@us...> - 2005-05-15 23:42:07
|
Update of /cvsroot/easystruts/easystruts-website/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32600/lib Log Message: Directory /cvsroot/easystruts/easystruts-website/lib added to the repository |
From: Francois G. <far...@us...> - 2005-04-27 05:47:36
|
Update of /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6376/src/org/easystruts/eclipse/editor Modified Files: AlertSection.java EditorUtils.java EasyStrutsEditor.java EasyStrutsEditorContributor.java AbstractStrutsConfigModel.java StrutsConfigTreeSection.java EasyStrutsFormSection.java ActionSection.java EasyStrutsForm.java Log Message: Fixed a lot of compilation errors. Still ~ 400 of them (was 650 before). This requires the plugin "org.eclipse.update.ui.forms", which is not in 3.0 or 3.1 anymore. A solution is to take it from CVS (tag R2_1_3). Index: ActionSection.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/ActionSection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ActionSection.java 15 Apr 2005 04:25:35 -0000 1.1 --- ActionSection.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 31,35 **** import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; ! import org.eclipse.update.ui.forms.internal.FormEntry; import org.eclipse.update.ui.forms.internal.FormWidgetFactory; import org.eclipse.update.ui.forms.internal.HyperlinkAdapter; --- 31,37 ---- import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; ! import org.eclipse.pde.internal.ui.parts.FormEntry; ! import org.eclipse.ui.forms.widgets.FormToolkit; ! import org.eclipse.ui.forms.widgets.Section; import org.eclipse.update.ui.forms.internal.FormWidgetFactory; import org.eclipse.update.ui.forms.internal.HyperlinkAdapter; *************** *** 104,110 **** public ActionSection(EasyStrutsFormPage page) { super(page); ! setHeaderText("Action"); setDescription(DTDReader.getStrutsConfigComment("action")); ! } public void commitChanges(boolean onSave) { --- 106,115 ---- public ActionSection(EasyStrutsFormPage page) { super(page); ! /* ! * TODO 3.0: re-add this somehow ! setHeaderText("Action"); setDescription(DTDReader.getStrutsConfigComment("action")); ! */ ! } public void commitChanges(boolean onSave) { *************** *** 1216,1218 **** --- 1221,1237 ---- } + /* (non-Javadoc) + * @see org.eclipse.pde.internal.ui.editor.PDESection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit) + */ + protected void createClient(Section section, FormToolkit toolkit) { + /* + * + public Composite createClient( + Composite parent, + FormWidgetFactory newFactory) { + */ + // TODO Auto-generated method stub + createClient(section.getParent(), new FormWidgetFactory()); + } + } Index: EasyStrutsFormSection.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/EasyStrutsFormSection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyStrutsFormSection.java 15 Apr 2005 04:25:35 -0000 1.1 --- EasyStrutsFormSection.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 23,27 **** import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.pde.internal.ui.editor.PDEFormPage; ! import org.eclipse.pde.internal.ui.editor.PDEFormSection; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseEvent; --- 23,29 ---- import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.pde.internal.ui.editor.PDEFormPage; ! import org.eclipse.pde.internal.ui.editor.PDESection; ! import org.eclipse.pde.internal.ui.editor.feature.FeatureFormPage; ! //import org.eclipse.pde.internal.ui.editor.PDEFormSection; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseEvent; *************** *** 44,47 **** --- 46,50 ---- import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.Text; + import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.part.EditorPart; import org.eclipse.update.ui.forms.internal.FormEntry; *************** *** 59,63 **** * Window>Preferences>Java>Code Generation. */ ! public abstract class EasyStrutsFormSection extends PDEFormSection { static final Object lock = new Object(); --- 62,66 ---- * Window>Preferences>Java>Code Generation. */ ! public abstract class EasyStrutsFormSection extends PDESection { static final Object lock = new Object(); *************** *** 68,71 **** --- 71,79 ---- public static Image HELP; + // TODO 3.0: added this method, now need to verify that this is working + protected PDEFormPage getFormPage() { + return this.getPage(); + } + static { ImageData source = new ImageData(EasyStruts.class.getResourceAsStream("fixIcon.gif")); *************** *** 113,118 **** ! public EasyStrutsFormSection(PDEFormPage formPage) { ! super(formPage); } --- 121,126 ---- ! public EasyStrutsFormSection(PDEFormPage formPage, Composite parent) { ! super(formPage, parent, Section.DESCRIPTION); } *************** *** 260,264 **** // new HyperlinkAdapter() { // public void linkActivated(Control link) { ! // EditorUtils.viewElementInEditor( getFormPage().getEditor(), element); // } // }); --- 268,272 ---- // new HyperlinkAdapter() { // public void linkActivated(Control link) { ! // EditorUtils.viewElementInEditor( getPage().getEditor(), element); // } // }); *************** *** 278,282 **** // new HyperlinkAdapter() { // public void linkActivated(Control link) { ! // EditorUtils.viewElementInEditor( getFormPage().getEditor(), element); // } // }); --- 286,290 ---- // new HyperlinkAdapter() { // public void linkActivated(Control link) { ! // EditorUtils.viewElementInEditor( getPage().getEditor(), element); // } // }); *************** *** 293,297 **** // new HyperlinkAdapter() { // public void linkActivated(Control link) { ! // EditorUtils.viewElementInSource( getFormPage().getEditor(), element); // } // }); --- 301,305 ---- // new HyperlinkAdapter() { // public void linkActivated(Control link) { ! // EditorUtils.viewElementInSource( getPage().getEditor(), element); // } // }); *************** *** 471,482 **** } - public void update() { - reflow(); - } - - protected void reflow() { - super.reflow(); - } - /** * Update the set-property table. --- 479,482 ---- *************** *** 578,582 **** removeAlert(entry,element + TYPE_INVALID); } ! if ( !FileUtils.classExist(((EasyStrutsEditor)getFormPage().getEditor()).getProject(),type) ) { addAlertWithFix(entry,element + TYPE_ERROR); return; --- 578,582 ---- removeAlert(entry,element + TYPE_INVALID); } ! if ( !FileUtils.classExist(((EasyStrutsEditor)getPage().getEditor()).getProject(),type) ) { addAlertWithFix(entry,element + TYPE_ERROR); return; *************** *** 705,722 **** private boolean definitionExist(String name) { // Check tiles definition ! if ( getFormPage().getModel() instanceof ITilesModel ) { System.out.println("check " + name); ! System.out.println(" get " + ((ITilesModel)getFormPage().getModel()).getTilesDefinitionsConfig().findDefinitionConfigs().length); ! if ( ((ITilesModel)getFormPage().getModel()).getTilesDefinitionsConfig().findDefinitionConfig(name) != null ) { return true; } } ! if ( getFormPage().getModel() instanceof IEasyStrutsModel ) { System.out.println("check " + name); ! System.out.println(" get " + ((IEasyStrutsModel)getFormPage().getModel()).getApplicationConfig().getDefinitions().size()); ! if ( ((IEasyStrutsModel)getFormPage().getModel()).getApplicationConfig().findDefinition(name) != null ) { return true; } --- 705,722 ---- private boolean definitionExist(String name) { // Check tiles definition ! if ( getPage().getModel() instanceof ITilesModel ) { System.out.println("check " + name); ! System.out.println(" get " + ((ITilesModel)getPage().getModel()).getTilesDefinitionsConfig().findDefinitionConfigs().length); ! if ( ((ITilesModel)getPage().getModel()).getTilesDefinitionsConfig().findDefinitionConfig(name) != null ) { return true; } } ! if ( getPage().getModel() instanceof IEasyStrutsModel ) { System.out.println("check " + name); ! System.out.println(" get " + ((IEasyStrutsModel)getPage().getModel()).getApplicationConfig().getDefinitions().size()); ! if ( ((IEasyStrutsModel)getPage().getModel()).getApplicationConfig().findDefinition(name) != null ) { return true; } *************** *** 727,732 **** private boolean mappingExist(String path) { // Check action mapping ! if ( getFormPage().getModel() instanceof IEasyStrutsModel ) { ! if ( ((IEasyStrutsModel)getFormPage().getModel()).getApplicationConfig().findActionConfig(path) != null ) { return true; } --- 727,732 ---- private boolean mappingExist(String path) { // Check action mapping ! if ( getPage().getModel() instanceof IEasyStrutsModel ) { ! if ( ((IEasyStrutsModel)getPage().getModel()).getApplicationConfig().findActionConfig(path) != null ) { return true; } *************** *** 737,742 **** private boolean fileExist(String file) throws Exception { // Check files ! file = ProjectUtils.getPersistentProperty(((EasyStrutsEditor)getFormPage().getEditor()).getProject(),Properties.STRUTS_PROJECT_ROOTDIR) + "/" + file; ! if ( FileUtils.fileExist(((EasyStrutsEditor)getFormPage().getEditor()).getProject(),new Path(file)) ) { return true; } --- 737,742 ---- private boolean fileExist(String file) throws Exception { // Check files ! file = ProjectUtils.getPersistentProperty(((EasyStrutsEditor)getPage().getEditor()).getProject(),Properties.STRUTS_PROJECT_ROOTDIR) + "/" + file; ! if ( FileUtils.fileExist(((EasyStrutsEditor)getPage().getEditor()).getProject(),new Path(file)) ) { return true; } Index: EditorUtils.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/EditorUtils.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EditorUtils.java 15 Apr 2005 04:25:35 -0000 1.1 --- EditorUtils.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 32,39 **** import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.window.Window; - import org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.PartInitException; import org.eclipse.ui.part.EditorPart; --- 32,39 ---- import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.PartInitException; + import org.eclipse.ui.forms.editor.FormEditor; import org.eclipse.ui.part.EditorPart; *************** *** 255,259 **** */ public static void handleJspOpen( ! PDEMultiPageEditor pDEMultiPageEditor, String string) { } --- 255,259 ---- */ public static void handleJspOpen( ! FormEditor pDEMultiPageEditor, String string) { } *************** *** 265,269 **** */ public static void viewElementInSource( ! PDEMultiPageEditor pDEMultiPageEditor, ConfigWriter element) { } --- 265,269 ---- */ public static void viewElementInSource( ! FormEditor pDEMultiPageEditor, ConfigWriter element) { } *************** *** 275,279 **** */ public static void viewElementInEditor( ! PDEMultiPageEditor pDEMultiPageEditor, ConfigWriter element) { } --- 275,279 ---- */ public static void viewElementInEditor( ! FormEditor pDEMultiPageEditor, ConfigWriter element) { } Index: AlertSection.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/AlertSection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AlertSection.java 15 Apr 2005 04:25:35 -0000 1.1 --- AlertSection.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 9,16 **** import org.eclipse.core.resources.IResourceDeltaVisitor; import org.eclipse.pde.internal.ui.PDEPluginImages; ! import org.eclipse.pde.internal.ui.editor.PDEFormSection; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.update.ui.forms.internal.FormWidgetFactory; import org.eclipse.update.ui.forms.internal.HyperlinkHandler; --- 9,19 ---- import org.eclipse.core.resources.IResourceDeltaVisitor; import org.eclipse.pde.internal.ui.PDEPluginImages; ! //import org.eclipse.pde.internal.ui.editor.PDEFormSection; ! import org.eclipse.pde.internal.ui.editor.PDESection; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; + import org.eclipse.ui.forms.widgets.FormToolkit; + import org.eclipse.ui.forms.widgets.Section; import org.eclipse.update.ui.forms.internal.FormWidgetFactory; import org.eclipse.update.ui.forms.internal.HyperlinkHandler; *************** *** 25,29 **** */ public class AlertSection ! extends PDEFormSection implements IResourceChangeListener { --- 28,32 ---- */ public class AlertSection ! extends PDESection implements IResourceChangeListener { *************** *** 63,69 **** } ! public AlertSection(EasyStrutsFormPage page) { ! super(page); ! setHeaderText("Alert"); EasyStrutsPlugin.getWorkspace().addResourceChangeListener(this); handler = new HyperlinkHandler(); --- 66,75 ---- } ! public AlertSection(EasyStrutsFormPage page, Composite parent) { ! super(page, parent, Section.DESCRIPTION); ! getSection().setText("Alert"); ! // maybe... ! //createClient(getSection(), page.getManagedForm().getToolkit()); ! EasyStrutsPlugin.getWorkspace().addResourceChangeListener(this); handler = new HyperlinkHandler(); *************** *** 102,104 **** --- 108,118 ---- } + /* (non-Javadoc) + * @see org.eclipse.pde.internal.ui.editor.PDESection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit) + */ + protected void createClient(Section section, FormToolkit toolkit) { + // TODO Auto-generated method stub + + } + } Index: StrutsConfigTreeSection.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/StrutsConfigTreeSection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StrutsConfigTreeSection.java 15 Apr 2005 04:25:35 -0000 1.1 --- StrutsConfigTreeSection.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 15,18 **** --- 15,22 ---- import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; + import org.eclipse.pde.core.IModelChangedEvent; + import org.eclipse.pde.core.IModelChangedListener; + import org.eclipse.pde.internal.ui.editor.TreeSection; + import org.eclipse.pde.internal.ui.parts.TreePart; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.BusyIndicator; *************** *** 30,33 **** --- 34,38 ---- import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.part.DrillDownAdapter; + import org.eclipse.update.ui.forms.internal.FormWidgetFactory; Index: AbstractStrutsConfigModel.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/AbstractStrutsConfigModel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractStrutsConfigModel.java 15 Apr 2005 04:25:35 -0000 1.1 --- AbstractStrutsConfigModel.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 13,16 **** --- 13,18 ---- import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; + import org.eclipse.core.runtime.IStatus; + import org.eclipse.core.runtime.Status; import org.eclipse.pde.core.IModelChangedEvent; import org.eclipse.pde.core.ModelChangedEvent; *************** *** 128,136 **** try { fireModelChanged( new ModelChangedEvent( ! IModelChangedEvent.WORLD_CHANGED, new Object[] { this }, null)); ! } catch ( Exception e ) {;} } --- 130,142 ---- try { fireModelChanged( + /* TODO 3.0: added a "null" as first argument, to make to compile, must be a "IModelChangeProvider" and I'm not sure where it's comming from */ new ModelChangedEvent( ! null, IModelChangedEvent.WORLD_CHANGED, new Object[] { this }, null)); ! } catch ( Exception e ) { ! // TODO for 3.0: improve this ! throw new CoreException(new Status(Status.ERROR, "Struts", -1, "TODO: fix this", e)); ! } } Index: EasyStrutsEditorContributor.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/EasyStrutsEditorContributor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyStrutsEditorContributor.java 15 Apr 2005 04:25:35 -0000 1.1 --- EasyStrutsEditorContributor.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 1,5 **** package org.easystruts.eclipse.editor; ! import org.eclipse.pde.internal.ui.editor.PDEEditorContributor; /** --- 1,6 ---- package org.easystruts.eclipse.editor; ! import org.eclipse.ui.IEditorPart; ! import org.eclipse.ui.part.MultiPageEditorActionBarContributor; /** *************** *** 11,18 **** * Window>Preferences>Java>Code Generation. */ ! public class EasyStrutsEditorContributor extends PDEEditorContributor { public EasyStrutsEditorContributor() { ! super("&Struts"); } } --- 12,29 ---- * Window>Preferences>Java>Code Generation. */ ! public class EasyStrutsEditorContributor extends MultiPageEditorActionBarContributor { public EasyStrutsEditorContributor() { ! //TODO for 3.0: see why "&Struts" is needed ! // super("&Struts"); ! super(); ! } ! ! /* (non-Javadoc) ! * @see org.eclipse.ui.part.MultiPageEditorActionBarContributor#setActivePage(org.eclipse.ui.IEditorPart) ! */ ! public void setActivePage(IEditorPart activeEditor) { ! // TODO: implement for 3.0 ! } } Index: EasyStrutsForm.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/EasyStrutsForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyStrutsForm.java 15 Apr 2005 04:25:35 -0000 1.1 --- EasyStrutsForm.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 1,4 **** --- 1,9 ---- package org.easystruts.eclipse.editor; + import org.eclipse.swt.widgets.*; + import org.eclipse.swt.graphics.*; + import org.eclipse.swt.SWT; + import org.eclipse.swt.events.*; + import java.text.*; import org.easystruts.eclipse.EasyStrutsPlugin; import org.easystruts.eclipse.views.EasyStrutsView; *************** *** 19,22 **** --- 24,29 ---- import org.eclipse.swt.widgets.Control; import org.eclipse.update.ui.forms.internal.ScrollableSectionForm; + + /** * @author Administrateur Index: EasyStrutsEditor.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/EasyStrutsEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyStrutsEditor.java 15 Apr 2005 04:25:35 -0000 1.1 --- EasyStrutsEditor.java 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 86,89 **** --- 86,90 ---- import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Status; + import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.util.IPropertyChangeListener; *************** *** 91,97 **** import org.eclipse.pde.core.IEditable; import org.eclipse.pde.core.IModel; ! import org.eclipse.pde.internal.core.IModelProvider; ! import org.eclipse.pde.internal.ui.editor.IPDEEditorPage; ! import org.eclipse.pde.internal.ui.editor.PDEMultiPageXMLEditor; /** --- 92,98 ---- import org.eclipse.pde.core.IEditable; import org.eclipse.pde.core.IModel; ! import org.eclipse.pde.core.IModelProvider; ! import org.eclipse.swt.widgets.Shell; ! import org.eclipse.ui.forms.editor.FormEditor; /** *************** *** 102,106 **** */ public class EasyStrutsEditor ! extends PDEMultiPageXMLEditor implements IPropertyChangeListener, IResourceChangeListener { public static final String EASYSTRUTS_PAGE = "EasyStrutsPage"; --- 103,107 ---- */ public class EasyStrutsEditor ! extends FormEditor implements IPropertyChangeListener, IResourceChangeListener { public static final String EASYSTRUTS_PAGE = "EasyStrutsPage"; *************** *** 148,154 **** EasyStrutsPlugin.getDefault().getEasyStrutsConfigModelManager(); modelProvider.connect(file, this); IEasyStrutsModel model = ! (IEasyStrutsModel) modelProvider.getModel(file, this); model.setEditor(this); --- 149,157 ---- EasyStrutsPlugin.getDefault().getEasyStrutsConfigModelManager(); + /* TODO: is it needed in 3.0 ?? modelProvider.connect(file, this); + */ IEasyStrutsModel model = ! (IEasyStrutsModel) modelProvider.getModel(file); model.setEditor(this); *************** *** 220,244 **** ! /** ! * @see org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor#createPages() ! */ ! protected void createPages() { firstPageId = EASYSTRUTS_PAGE; formWorkbook.setFirstPageSelected(false); EasyStrutsFormPage formPage = new EasyStrutsFormPage( this, "Easy Struts"); ! addPage(EASYSTRUTS_PAGE, formPage); ! addPage(SOURCE_PAGE, new EasyStrutsSourcePage(this)); } /** * @see org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor#getHomePage() */ public IPDEEditorPage getHomePage() { return getPage(EASYSTRUTS_PAGE); } ! /** * @see org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor#getSourcePageId() --- 223,250 ---- ! ! protected void addPages() { ! /* TODO: port to 3.0 firstPageId = EASYSTRUTS_PAGE; formWorkbook.setFirstPageSelected(false); + */ EasyStrutsFormPage formPage = new EasyStrutsFormPage( this, "Easy Struts"); ! addPage(formPage); // TODO: how to pass page name EASYSTRUTS_PAGE ! addPage(new EasyStrutsSourcePage(this)); // TODO: how to pass page name SOURCE_PAGE } + /** * @see org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor#getHomePage() */ + /* + * Not needed any more in 3.0 ? public IPDEEditorPage getHomePage() { return getPage(EASYSTRUTS_PAGE); } ! */ /** * @see org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor#getSourcePageId() *************** *** 420,429 **** --- 426,443 ---- public void doSave(IProgressMonitor monitor) { + MessageDialog.openInformation(new Shell(), "EasyStruts", "Not ported yet to 3.0"); + // TODO: port to 3.0 + /* super.doSave(monitor); IEditable editable = (IEditable)model; editable.setDirty(false); fireSaveNeeded(); + */ } + public void doSaveAs()) { + MessageDialog.openInformation(new Shell(), "EasyStruts", "Not implemented yet to 3.0"); + // TODO: implement in 3.0 + } /** * Returns the project. *************** *** 444,446 **** --- 458,468 ---- } + /* (non-Javadoc) + * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed() + */ + public boolean isSaveAsAllowed() { + // TODO : implement in 3.0 + return false; + } + } |
From: Francois G. <far...@us...> - 2005-04-27 05:47:35
|
Update of /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/wizards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6376/src/org/easystruts/eclipse/wizards Modified Files: NewEasyStrutsWizardPage.java NewEasyStrutsWizard.java Log Message: Fixed a lot of compilation errors. Still ~ 400 of them (was 650 before). This requires the plugin "org.eclipse.update.ui.forms", which is not in 3.0 or 3.1 anymore. A solution is to take it from CVS (tag R2_1_3). Index: NewEasyStrutsWizardPage.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/wizards/NewEasyStrutsWizardPage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NewEasyStrutsWizardPage.java 15 Apr 2005 04:25:48 -0000 1.1 --- NewEasyStrutsWizardPage.java 27 Apr 2005 05:46:55 -0000 1.2 *************** *** 245,249 **** Button button= input.getChangeControl(composite); gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); ! gd.heightHint = SWTUtil.getButtonHeigthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button); button.setLayoutData(gd); --- 245,250 ---- Button button= input.getChangeControl(composite); gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); ! // TODO 3.0: check that this is working OK, it seems that this call is not needed any more, see for an example: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/Attic/NewTestCaseCreationWizardPage.java.diff?r1=1.28&r2=1.42 ! //gd.heightHint = SWTUtil.getButtonHeightHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button); button.setLayoutData(gd); Index: NewEasyStrutsWizard.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/wizards/NewEasyStrutsWizard.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NewEasyStrutsWizard.java 15 Apr 2005 04:25:48 -0000 1.1 --- NewEasyStrutsWizard.java 27 Apr 2005 05:46:55 -0000 1.2 *************** *** 37,40 **** --- 37,41 ---- import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; + import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.IClasspathEntry; *************** *** 268,275 **** public abstract boolean isWizardSupported(int version); public abstract void setPages(); /** * @see org.eclipse.jface.wizard.IWizard#performFinish() */ ! public final boolean performFinish() { if ( strutsSupportWizardPage != null ) { try { --- 269,281 ---- public abstract boolean isWizardSupported(int version); public abstract void setPages(); + /** * @see org.eclipse.jface.wizard.IWizard#performFinish() */ ! ! // TODO 3.0: check if this works. I moved all the code from performFinish to finishPage ! //public final boolean performFinish() { ! ! protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException { if ( strutsSupportWizardPage != null ) { try { *************** *** 320,324 **** } } ! return perform(); } --- 326,330 ---- } } ! perform(); } |
From: Francois G. <far...@us...> - 2005-04-27 05:47:34
|
Update of /cvsroot/easystruts/net.sf.easystruts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6376 Modified Files: .classpath plugin.xml Log Message: Fixed a lot of compilation errors. Still ~ 400 of them (was 650 before). This requires the plugin "org.eclipse.update.ui.forms", which is not in 3.0 or 3.1 anymore. A solution is to take it from CVS (tag R2_1_3). Index: .classpath =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/.classpath,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .classpath 15 Apr 2005 04:25:48 -0000 1.1 --- .classpath 27 Apr 2005 05:46:54 -0000 1.2 *************** *** 11,18 **** <classpathentry kind="lib" path="lib/jdom/jdom-1.0.jar"/> <classpathentry kind="lib" path="lib/junit/junit-3.8.1.jar"/> - <classpathentry kind="lib" path="lib/xalan/xalan-j-2.6.0.jar"/> - <classpathentry kind="lib" path="lib/xerces/xerces-J-2.6.2-xercesImpl.jar"/> - <classpathentry kind="lib" path="lib/xerces/xerces-J-2.6.2-xml-apis.jar"/> - <classpathentry kind="lib" path="lib/xerces/xerces-J-2.6.2-xmlParserAPIs.jar"/> <classpathentry kind="output" path="bin"/> </classpath> --- 11,14 ---- Index: plugin.xml =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/plugin.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plugin.xml 16 Apr 2005 00:23:40 -0000 1.2 --- plugin.xml 27 Apr 2005 05:46:55 -0000 1.3 *************** *** 56,59 **** --- 56,60 ---- <import plugin="org.eclipse.update.ui"/> <import plugin="org.eclipse.ui.forms"/> + <import plugin="org.eclipse.update.ui.forms"/> </requires> |
From: Francois G. <far...@us...> - 2005-04-27 05:47:08
|
Update of /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/jdom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6376/src/org/easystruts/jdom Modified Files: XMLOutputter.java JDomStruts.java Log Message: Fixed a lot of compilation errors. Still ~ 400 of them (was 650 before). This requires the plugin "org.eclipse.update.ui.forms", which is not in 3.0 or 3.1 anymore. A solution is to take it from CVS (tag R2_1_3). Index: JDomStruts.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/jdom/JDomStruts.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JDomStruts.java 15 Apr 2005 04:25:37 -0000 1.1 --- JDomStruts.java 27 Apr 2005 05:46:57 -0000 1.2 *************** *** 652,666 **** public static void saveDocument(Document document, OutputStream os, int version, boolean reconstruct) throws IOException { - XMLOutputter outputter = new XMLOutputter(); - Format f = Format.getPrettyFormat(); f.setLineSeparator("\n"); - outputter.setFormat(f); - // outputter.setIndent(true); - // outputter.setIndentSize(4); - // outputter.setNewlines(true); - // outputter.setLineSeparator("\n"); - // outputter.setTextNormalize(true); if (version == 2 || version == 3) { outputter.output(document, os); --- 652,660 ---- public static void saveDocument(Document document, OutputStream os, int version, boolean reconstruct) throws IOException { Format f = Format.getPrettyFormat(); f.setLineSeparator("\n"); + XMLOutputter outputter = new XMLOutputter(f); + if (version == 2 || version == 3) { outputter.output(document, os); *************** *** 677,685 **** public static String printDocument(Document document, int version, boolean reconstruct) throws IOException { ! XMLOutputter outputter = new XMLOutputter(); ByteArrayOutputStream out = new ByteArrayOutputStream(); - Format f = Format.getPrettyFormat(); - outputter.setFormat(f); //POM // outputter.setIndent(true); --- 671,678 ---- public static String printDocument(Document document, int version, boolean reconstruct) throws IOException { ! Format f = Format.getPrettyFormat(); ! XMLOutputter outputter = new XMLOutputter(f); ByteArrayOutputStream out = new ByteArrayOutputStream(); //POM // outputter.setIndent(true); *************** *** 778,792 **** public static void saveDocument(Document document, PrintWriter writer, int version, boolean reconstruct) throws IOException { - XMLOutputter outputter = new XMLOutputter(); - Format f = Format.getPrettyFormat(); ! outputter.setFormat(f); ! ! //pom ! // outputter.setIndent(true); ! // outputter.setIndentSize(4); ! // outputter.setNewlines(true); ! // outputter.setLineSeparator("\n"); ! // outputter.setTextNormalize(true); if (version == 2) { --- 771,776 ---- public static void saveDocument(Document document, PrintWriter writer, int version, boolean reconstruct) throws IOException { Format f = Format.getPrettyFormat(); ! XMLOutputter outputter = new XMLOutputter(f); if (version == 2) { *************** *** 803,815 **** public static void println(Document document) throws IOException { ! XMLOutputter outputter = new XMLOutputter(); Format f = Format.getPrettyFormat(); ! outputter.setFormat(f); - // outputter.setIndent(true); - // outputter.setIndentSize(4); - // outputter.setNewlines(true); - // outputter.setLineSeparator("\n"); - // outputter.setTextNormalize(true); outputter.output(document, System.out); System.out.println(); --- 787,794 ---- public static void println(Document document) throws IOException { ! Format f = Format.getPrettyFormat(); ! XMLOutputter outputter = new XMLOutputter(f); outputter.output(document, System.out); System.out.println(); Index: XMLOutputter.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/jdom/XMLOutputter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XMLOutputter.java 15 Apr 2005 04:25:37 -0000 1.1 --- XMLOutputter.java 27 Apr 2005 05:46:57 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- import java.util.List; import org.jdom.*; + import org.jdom.output.Format; /** *************** *** 12,15 **** --- 13,19 ---- public class XMLOutputter extends org.jdom.output.XMLOutputter { + public XMLOutputter(Format format) { + super(format); + } /** number of attributes for adding newLine */ protected int numberAttributesForNewLine=4; *************** *** 26,31 **** out.write("\n"); ! indent(out, level); ! super.printComment(comment,out); } --- 30,36 ---- out.write("\n"); ! // TODO 3.0 indent method is now private, see how to make it work ! //indent(out, level); ! super.printComment(out,comment); } *************** *** 39,43 **** Element e=parent; while ( e != null ) { ! e = e.getParent(); level++; } --- 44,48 ---- Element e=parent; while ( e != null ) { ! e = e.getParentElement(); level++; } *************** *** 54,58 **** if ( size >= numberAttributesForNewLine ) { out.write("\n"); ! indent(out, level); } else { out.write(" "); --- 59,64 ---- if ( size >= numberAttributesForNewLine ) { out.write("\n"); ! // TODO 3.0 indent method is now private, see how to make it work ! //indent(out, level); } else { out.write(" "); |
From: Francois G. <far...@us...> - 2005-04-27 05:47:07
|
Update of /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/xslgen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6376/src/org/easystruts/eclipse/xslgen Modified Files: EclipseResourceWriter.java EclipseJdtWriter.java Log Message: Fixed a lot of compilation errors. Still ~ 400 of them (was 650 before). This requires the plugin "org.eclipse.update.ui.forms", which is not in 3.0 or 3.1 anymore. A solution is to take it from CVS (tag R2_1_3). Index: EclipseResourceWriter.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/xslgen/EclipseResourceWriter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EclipseResourceWriter.java 15 Apr 2005 04:26:11 -0000 1.1 --- EclipseResourceWriter.java 27 Apr 2005 05:46:56 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceStatus; + import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; *************** *** 130,134 **** protected IFile createFileHandle(IPath filePath) { ! return WorkbenchPlugin.getPluginWorkspace().getRoot().getFile(filePath); } --- 131,135 ---- protected IFile createFileHandle(IPath filePath) { ! return ResourcesPlugin.getWorkspace().getRoot().getFile(filePath); } Index: EclipseJdtWriter.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/xslgen/EclipseJdtWriter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EclipseJdtWriter.java 15 Apr 2005 04:26:11 -0000 1.1 --- EclipseJdtWriter.java 27 Apr 2005 05:46:56 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- import java.lang.reflect.InvocationTargetException; import java.util.Iterator; + import java.util.Map; import java.util.StringTokenizer; *************** *** 25,38 **** import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.ToolFactory; import org.eclipse.jdt.internal.corext.codemanipulation.ImportsStructure; import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility; ! import org.eclipse.jdt.internal.corext.template.Template; ! import org.eclipse.jdt.internal.corext.template.Templates; import org.eclipse.jdt.internal.corext.template.java.JavaContext; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation; import org.jdom.Document; --- 26,44 ---- import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.ToolFactory; + import org.eclipse.jdt.core.formatter.CodeFormatter; import org.eclipse.jdt.internal.corext.codemanipulation.ImportsStructure; import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility; ! import org.eclipse.jface.text.BadLocationException; ! import org.eclipse.jface.text.templates.Template; ! import org.eclipse.jface.text.templates.TemplateException; import org.eclipse.jdt.internal.corext.template.java.JavaContext; + import org.eclipse.jdt.internal.corext.util.CodeFormatterUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.preferences.ImportOrganizePreferencePage; + import org.eclipse.jdt.ui.PreferenceConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; + import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation; import org.jdom.Document; *************** *** 84,87 **** --- 90,125 ---- } + // TODO 3.0: I had to copy this code from old version, there's probably a better way... + // see http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizePreferencePage.java.diff?r1=1.41&r2=1.42 + private static int getImportNumberThreshold() { + IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore(); + int threshold= prefs.getInt(PreferenceConstants.ORGIMPORTS_ONDEMANDTHRESHOLD); + if (threshold < 0) { + threshold= Integer.MAX_VALUE; + } + return threshold; + } + + private static String[] getImportOrderPreference() { + IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore(); + String str= prefs.getString(PreferenceConstants.ORGIMPORTS_IMPORTORDER); + if (str != null) { + return unpackOrderList(str); + } + return new String[0]; + } + + + private static String[] unpackOrderList(String str) { + StringTokenizer tok= new StringTokenizer(str, ";"); //$NON-NLS-1$ + int nTokens= tok.countTokens(); + String[] res= new String[nTokens]; + for (int i= 0; i < nTokens; i++) { + res[i]= tok.nextToken(); + } + return res; + } + // END TODO copied code... + public void createType(IProgressMonitor monitor) throws Exception{ *************** *** 179,184 **** /** Ajout des imports */ ! String[] prefOrder = ImportOrganizePreferencePage.getImportOrderPreference(); ! int threshold = ImportOrganizePreferencePage.getImportNumberThreshold(); ImportsStructure imports = new ImportsStructure(parentCU, prefOrder, threshold, false); for (Iterator i = javaClass.getImports().iterator(); i.hasNext();) { --- 217,222 ---- /** Ajout des imports */ ! String[] prefOrder = /* ImportOrganizePreferencePage. */ getImportOrderPreference(); ! int threshold = /* ImportOrganizePreferencePage. */ getImportNumberThreshold(); ImportsStructure imports = new ImportsStructure(parentCU, prefOrder, threshold, false); for (Iterator i = javaClass.getImports().iterator(); i.hasNext();) { *************** *** 194,199 **** String originalContent = buf.getText(range.getOffset(), range.getLength()); ! String formattedContent = ! StubUtility.codeFormat(originalContent, 0, "\n"); buf.replace(range.getOffset(), range.getLength(), formattedContent); monitor.worked(4); --- 232,242 ---- String originalContent = buf.getText(range.getOffset(), range.getLength()); ! // 3.0: modified as in http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.ui/core%20extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java.diff?r1=1.25&r2=1.22 ! // String formattedContent = ! // StubUtility.codeFormat(originalContent, 0, "\n"); ! String formattedContent= ! CodeFormatterUtil.format(CodeFormatter.K_CLASS_BODY_DECLARATIONS, originalContent, ! 0, null, "\n", (Map)null) + "\n"; ! buf.replace(range.getOffset(), range.getLength(), formattedContent); monitor.worked(4); *************** *** 245,254 **** protected String getTemplate(String name, ICompilationUnit parentCU, int pos) { try { ! Template[] templates= Templates.getInstance().getTemplates(name); ! if (templates.length > 0) { ! return JavaContext.evaluateTemplate(templates[0], parentCU, pos); } } catch (CoreException e) { JavaPlugin.log(e); } return null; --- 288,301 ---- protected String getTemplate(String name, ICompilationUnit parentCU, int pos) { try { ! Template template = JavaPlugin.getDefault().getTemplateStore().findTemplate(name); ! if (template != null) { ! return JavaContext.evaluateTemplate(template, parentCU, pos); } } catch (CoreException e) { JavaPlugin.log(e); + } catch (BadLocationException e) { + JavaPlugin.log(e); + } catch (TemplateException e) { + JavaPlugin.log(e); } return null; |
From: Francois G. <far...@us...> - 2005-04-27 05:47:07
|
Update of /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/tiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6376/src/org/easystruts/eclipse/editor/tiles Modified Files: EasyStrutsTilesEditor.java EasyStrutsEditorTilesContributor.java Log Message: Fixed a lot of compilation errors. Still ~ 400 of them (was 650 before). This requires the plugin "org.eclipse.update.ui.forms", which is not in 3.0 or 3.1 anymore. A solution is to take it from CVS (tag R2_1_3). Index: EasyStrutsEditorTilesContributor.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/tiles/EasyStrutsEditorTilesContributor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyStrutsEditorTilesContributor.java 15 Apr 2005 04:25:33 -0000 1.1 --- EasyStrutsEditorTilesContributor.java 27 Apr 2005 05:46:57 -0000 1.2 *************** *** 62,66 **** package org.easystruts.eclipse.editor.tiles; ! import org.eclipse.pde.internal.ui.editor.PDEEditorContributor; /** --- 62,67 ---- package org.easystruts.eclipse.editor.tiles; ! import org.eclipse.ui.IEditorPart; ! import org.eclipse.ui.part.MultiPageEditorActionBarContributor; /** *************** *** 69,76 **** * @todo make it ! */ ! public class EasyStrutsEditorTilesContributor extends PDEEditorContributor { public EasyStrutsEditorTilesContributor() { ! super("&Struts"); } } --- 70,87 ---- * @todo make it ! */ ! public class EasyStrutsEditorTilesContributor extends MultiPageEditorActionBarContributor { public EasyStrutsEditorTilesContributor() { ! // TODO: understand why "&Struts" is needed ! //super("&Struts"); ! super(); ! } ! ! /* (non-Javadoc) ! * @see org.eclipse.ui.part.MultiPageEditorActionBarContributor#setActivePage(org.eclipse.ui.IEditorPart) ! */ ! public void setActivePage(IEditorPart activeEditor) { ! // TODO implement for 3.0 ! } } Index: EasyStrutsTilesEditor.java =================================================================== RCS file: /cvsroot/easystruts/net.sf.easystruts/src/org/easystruts/eclipse/editor/tiles/EasyStrutsTilesEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EasyStrutsTilesEditor.java 15 Apr 2005 04:25:33 -0000 1.1 --- EasyStrutsTilesEditor.java 27 Apr 2005 05:46:57 -0000 1.2 *************** *** 81,85 **** import org.eclipse.core.runtime.Status; import org.eclipse.jface.text.IDocument; ! import org.eclipse.pde.internal.core.IModelProvider; import org.eclipse.pde.internal.ui.editor.IPDEEditorPage; --- 81,85 ---- import org.eclipse.core.runtime.Status; import org.eclipse.jface.text.IDocument; ! import org.eclipse.pde.core.IModelProvider; import org.eclipse.pde.internal.ui.editor.IPDEEditorPage; *************** *** 215,222 **** * Return home page */ public IPDEEditorPage getHomePage() { return getPage(EASYSTRUTS_PAGE); } ! /** * Update the model --- 215,223 ---- * Return home page */ + /* Not needed any more in 3.0 ? public IPDEEditorPage getHomePage() { return getPage(EASYSTRUTS_PAGE); } ! */ /** * Update the model |