Revision: 3752 http://vexi.svn.sourceforge.net/vexi/?rev=3752&view=rev Author: mkpg2 Date: 2009-11-09 21:49:02 +0000 (Mon, 09 Nov 2009)
Log Message: ----------- Fix. - apply/revert activation in resource tab - loading project props (broken in trunk, not last release) - change lib 1.6 -> 1.5 bytecode (unnecessary requirement) Modified Paths: -------------- trunk/tools/org.vexi.vexidev/.classpath trunk/tools/org.vexi.vexidev/META-INF/MANIFEST.MF trunk/tools/org.vexi.vexidev/build.properties trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/VexiProject.java trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/VexidevUtils.java trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/debug/ui/LaunchPathEditor.java trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/debug/ui/LaunchTab.java trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/outline/OutlineXMLParser.java trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/EditableList.java trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/EditablePathList.java trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/SourcePathEditor.java trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/VexiPathEditor.java Added Paths: ----------- trunk/tools/org.vexi.vexidev/lib/jackson-0.9.1_comment_multiline.jar Removed Paths: ------------- trunk/tools/org.vexi.vexidev/lib/jackson-0.9.1_commentsupport.jar Modified: trunk/tools/org.vexi.vexidev/.classpath =================================================================== --- trunk/tools/org.vexi.vexidev/.classpath 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/.classpath 2009-11-09 21:49:02 UTC (rev 3752) @@ -3,6 +3,7 @@ <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src_junit"/> <classpathentry kind="src" path="src_dev"/> + <classpathentry exported="true" kind="lib" path="lib/jackson-0.9.1_comment_multiline.jar"/> <classpathentry exported="true" kind="lib" path="lib/org.ibex.util.jar"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry combineaccessrules="false" kind="src" path="/org.vexi.testutil"/> Modified: trunk/tools/org.vexi.vexidev/META-INF/MANIFEST.MF =================================================================== --- trunk/tools/org.vexi.vexidev/META-INF/MANIFEST.MF 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/META-INF/MANIFEST.MF 2009-11-09 21:49:02 UTC (rev 3752) @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Vexidev Plug-in -Bundle-SymbolicName: org.vexi.vexidev2;singleton:=true +Bundle-SymbolicName: org.vexi.vexidev;singleton:=true Bundle-Version: 0.3.6 Bundle-Activator: org.vexi.vexidev.VexidevPlugin Bundle-Localization: plugin @@ -31,7 +31,7 @@ Eclipse-AutoStart: true Plugin-Class: org.vexi.vexidev.VexidevPlugin Bundle-ClassPath: vexidev.jar, - lib/jackson-0.9.1_commentsupport.jar, - lib/org.ibex.util.jar + lib/org.ibex.util.jar, + lib/jackson-0.9.1_comment_multiline.jar Bundle-Vendor: vexi.org Modified: trunk/tools/org.vexi.vexidev/build.properties =================================================================== --- trunk/tools/org.vexi.vexidev/build.properties 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/build.properties 2009-11-09 21:49:02 UTC (rev 3752) @@ -2,8 +2,8 @@ plugin.xml,\ icons/,\ vexidev.jar,\ - lib/jackson-0.9.1_commentsupport.jar,\ - lib/org.ibex.util.jar + lib/org.ibex.util.jar,\ + lib/jackson-0.9.1_comment_multiline.jar src.includes = src/,\ plugin.xml,\ icons/,\ Added: trunk/tools/org.vexi.vexidev/lib/jackson-0.9.1_comment_multiline.jar =================================================================== (Binary files differ) Property changes on: trunk/tools/org.vexi.vexidev/lib/jackson-0.9.1_comment_multiline.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/tools/org.vexi.vexidev/lib/jackson-0.9.1_commentsupport.jar =================================================================== (Binary files differ) Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/VexiProject.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/VexiProject.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/VexiProject.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -102,30 +102,27 @@ } private List dynamicFromSourcePathList() throws DefinitionException { - List r = new ArrayList(sourceList.size()); - for(PathItem sf: sourceList){ - List tuple = new ArrayList(2); - tuple.add(""+sf.resource); - tuple.add(sf.type); - r.add(tuple); - } - return r; + return pathListToDynamicList(sourceList); } private List<PathItem> dynamicToSourcePathList(List dyn) throws DefinitionException{ // load old format - if(dyn.size()>0 && (dyn.get(0) instanceof String)){ - List resList = pathListFromDynamicList(dyn); - List<PathItem> sfList = new ArrayList(resList.size()); - for(Object res: resList){ - if(res instanceof IFolder){ - IFolder f = (IFolder)res; - sfList.add(PathItem.forFolder(f)); - }else - sfList.add(new PathItem(res,SourceType.NORMAL)); + List resList = pathListFromDynamicList(dyn); + List<PathItem> sfList = new ArrayList(resList.size()); + for(Object res: resList){ + if(res instanceof IFolder){ + IFolder f = (IFolder)res; + sfList.add(PathItem.forFolder(f)); + }else{ + sfList.add(new PathItem(res,SourceType.NORMAL)); } - return sfList; + } + return sfList; + + /* + if(dyn.size()>0 && (dyn.get(0) instanceof String)){ + }else{ List<PathItem> sfList = new ArrayList(dyn.size()); for(Object o: dyn){ @@ -138,7 +135,7 @@ } } return sfList; - } + }*/ } synchronized private void loadIfNecessary(){ @@ -157,10 +154,10 @@ }catch(Exception e){ log(e); } - }else{ - sourceList = new ArrayList(); - projectList = new ArrayList(); } + if(sourceList==null) sourceList = new ArrayList(); + if(projectList==null) projectList = new ArrayList(); + folderList = new ArrayList(sourceList.size()); for(PathItem pi: sourceList){ if(pi.resource instanceof IFolder) @@ -211,7 +208,7 @@ public PathItem<IFolder> getSourceFolder(String mainTemplate) { List<PathItem<IFolder>> sourcePath = getSourceFolders(); - String pathStr = mainTemplate.replace('.', '/'); + String pathStr = mainTemplate.replace('.', '/')+".t"; Path path = new Path(pathStr); for(PathItem<IFolder> pi: sourcePath){ if(pi.resource instanceof IFolder){ Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/VexidevUtils.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/VexidevUtils.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/VexidevUtils.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -25,6 +25,8 @@ static public List pathListFromString(String s) throws CoreException{ try { + if(s==null) + return Collections.EMPTY_LIST; List l = objToList(JSON.readObj(s)); return pathListFromDynamicList(l); } catch (DefinitionException e) { @@ -38,6 +40,9 @@ static public List<String> pathListToDynamicList(List l) throws DefinitionException{ List<String> r = new ArrayList(l.size()); for(Object res: l){ + if(res instanceof PathItem) + res = ((PathItem)res).resource; + String s; if(res instanceof IResource){ s = ""+res; Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/debug/ui/LaunchPathEditor.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/debug/ui/LaunchPathEditor.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/debug/ui/LaunchPathEditor.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -64,12 +64,6 @@ } @Override - protected void refresh() { - super.refresh(); - launchTab.updateLaunchConfigurationDialog(); - } - - @Override protected boolean isValidProject(IProject project) { return true; } Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/debug/ui/LaunchTab.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/debug/ui/LaunchTab.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/debug/ui/LaunchTab.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -50,9 +50,16 @@ */ abstract public class LaunchTab extends AbstractLaunchConfigurationTab implements IConstants { - private LaunchPathEditor launchPathPage; private Image tabIcon; - + // Modify listener shared between the widgets + final protected ModifyListener modifyListener = new ModifyListener(){ + public void modifyText(ModifyEvent e) + { + updateLaunchConfigurationDialog(); + } + }; + + public LaunchTab() { launchPathPage = new LaunchPathEditor(getShell(),this); @@ -70,22 +77,16 @@ private Text argumentsField; private Text vmArgumentsField; private Text mainTemplateField; - + private LaunchPathEditor launchPathPage; + + //Project UI widgets protected Text fProjText; private Button fProjButton; - // Modify listener shared between the widgets - protected ModifyListener modifyListener = new ModifyListener() - { - public void modifyText(ModifyEvent e) - { - updateLaunchConfigurationDialog(); - } - }; /* SelectionListener updateListener = new SelectionAdapter() { @@ -157,7 +158,7 @@ data.horizontalSpan = 2; pathBlockComposite.setLayoutData(data); launchPathPage.createControl(pathBlockComposite); //$NON-NLS-1$ //$NON-NLS-2$ - + launchPathPage.addModifyListener(modifyListener); Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/outline/OutlineXMLParser.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/outline/OutlineXMLParser.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/outline/OutlineXMLParser.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -71,7 +71,8 @@ public TemplateHelper(String sourceName, InputStream is) throws Exception { this.sourceName = sourceName; parse(new InputStreamReader(is)); - parseScript(rootN, sourceName); + if(rootN!=null) + parseScript(rootN, sourceName); } Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/EditableList.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/EditableList.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/EditableList.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -2,9 +2,13 @@ +import java.util.LinkedList; +import java.util.List; + import org.eclipse.core.runtime.QualifiedName; import org.eclipse.jface.viewers.*; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; @@ -22,10 +26,10 @@ abstract public class EditableList{ - - + protected void refresh() { viewer.refresh(); + fireModified(); } //// Customized properties @@ -43,6 +47,15 @@ protected TableViewer viewer; protected ContentProvider contentProvider = new ContentProvider(); + List<ModifyListener> modifyListeners = new LinkedList(); // just one (being lazy) + + public void addModifyListener(ModifyListener modifyListener){ + modifyListeners.add(modifyListener); + } + protected void fireModified(){ + for(ModifyListener ml: modifyListeners) + ml.modifyText(null); + } public Control createControl(Composite parent) { topComp= new Composite(parent, SWT.NONE); @@ -118,20 +131,35 @@ return buttonAdd; } + final private SelectionListener buttonListener = new SelectionListener(){ + public void widgetDefaultSelected(SelectionEvent e) {} + + public void widgetSelected(SelectionEvent e) { + IStructuredSelection selection = (IStructuredSelection)viewer.getSelection(); + if(e.getSource() == buttonRem){ + ((ContentProvider)viewer.getContentProvider()).remove(selection); + }else{ + Object o = selection.getFirstElement(); + if(e.getSource() == buttonMoveup){ + VexidevPlugin.trace("Move up"); + ((ContentProvider)viewer.getContentProvider()).moveup(o); + } + else if(e.getSource()== buttonMovedown){ + VexidevPlugin.trace("Move down"); + ((ContentProvider)viewer.getContentProvider()).movedown(o); + } + } + fireModified(); + }}; + + protected void createRemButton(Composite buttons){ buttonRem = new Button(buttons, SWT.PUSH); buttonRem.setEnabled(false); GridData data; buttonRem.setText("Remove Item"); - buttonRem.addSelectionListener(new SelectionListener(){ - - public void widgetSelected(SelectionEvent e) { - ((ContentProvider)viewer.getContentProvider()).remove(((IStructuredSelection)viewer.getSelection())); - } - - public void widgetDefaultSelected(SelectionEvent e) {} - }); + buttonRem.addSelectionListener(buttonListener); data = new GridData (); data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; @@ -144,24 +172,8 @@ buttonMovedown.setText("Move down"); buttonMoveup.setEnabled(false); buttonMovedown.setEnabled(false); - SelectionListener sl = new SelectionListener(){ - public void widgetDefaultSelected(SelectionEvent e) {} - - public void widgetSelected(SelectionEvent e) { - - IStructuredSelection selection = (IStructuredSelection)viewer.getSelection(); - Object o = selection.getFirstElement(); - if(e.getSource() == buttonMoveup){ - VexidevPlugin.trace("Move up"); - ((ContentProvider)viewer.getContentProvider()).moveup(o); - } - else{ - VexidevPlugin.trace("Move down"); - ((ContentProvider)viewer.getContentProvider()).movedown(o); - } - }}; - buttonMoveup.addSelectionListener(sl); - buttonMovedown.addSelectionListener(sl); + buttonMoveup.addSelectionListener(buttonListener); + buttonMovedown.addSelectionListener(buttonListener); GridData data; data = new GridData (); data.horizontalAlignment = GridData.FILL; @@ -210,6 +222,7 @@ for(int i=0; i<elements.length; i++){ contentProvider.add(elements[i]); } + fireModified(); } Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/EditablePathList.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/EditablePathList.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/EditablePathList.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -2,6 +2,7 @@ import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.jface.viewers.IBaseLabelProvider; +import org.eclipse.swt.events.ModifyListener; abstract public class EditablePathList extends EditableList { Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/SourcePathEditor.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/SourcePathEditor.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/SourcePathEditor.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -140,6 +140,7 @@ if(elements[i] instanceof IFile) ((ContentProvider)viewer.getContentProvider()).add(elements[i]); } + fireModified(); } } Modified: trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/VexiPathEditor.java =================================================================== --- trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/VexiPathEditor.java 2009-11-09 18:04:06 UTC (rev 3751) +++ trunk/tools/org.vexi.vexidev/src/org/vexi/vexidev/ui/VexiPathEditor.java 2009-11-09 21:49:02 UTC (rev 3752) @@ -7,6 +7,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.Window; +import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Button; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn