You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(80) |
Oct
(12) |
Nov
(237) |
Dec
(210) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(344) |
Feb
(311) |
Mar
(239) |
Apr
(72) |
May
(8) |
Jun
|
Jul
(73) |
Aug
(88) |
Sep
(235) |
Oct
(111) |
Nov
(325) |
Dec
(220) |
| 2006 |
Jan
(108) |
Feb
(64) |
Mar
(381) |
Apr
(98) |
May
(38) |
Jun
(16) |
Jul
(34) |
Aug
(70) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2007 |
Jan
(22) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
| 2010 |
Jan
(49) |
Feb
(9) |
Mar
(2) |
Apr
(17) |
May
(10) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Matthias K <mat...@us...> - 2006-04-05 16:13:25
|
Update of /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.compare/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13295/META-INF Modified Files: MANIFEST.MF Log Message: Updated to Eclipse 3.2 M6 Index: MANIFEST.MF =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.compare/META-INF/MANIFEST.MF,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MANIFEST.MF 28 Mar 2006 13:49:16 -0000 1.1 --- MANIFEST.MF 5 Apr 2006 16:12:49 -0000 1.2 *************** *** 3,7 **** Bundle-Name: %pluginName Bundle-SymbolicName: org.jcommander.eclipsepatch.compare;singleton:=true ! Bundle-Version: 3.2.0 Bundle-Activator: org.eclipse.compare.internal.CompareUIPlugin Bundle-Vendor: %providerName --- 3,7 ---- Bundle-Name: %pluginName Bundle-SymbolicName: org.jcommander.eclipsepatch.compare;singleton:=true ! Bundle-Version: 3.2.0.qualifier Bundle-Activator: org.eclipse.compare.internal.CompareUIPlugin Bundle-Vendor: %providerName |
|
From: Matthias K <mat...@us...> - 2006-04-05 16:12:59
|
Update of /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.compare/compare/org/eclipse/compare/patch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13295/compare/org/eclipse/compare/patch Modified Files: WorkspacePatcherUI.java Log Message: Updated to Eclipse 3.2 M6 Index: WorkspacePatcherUI.java =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.compare/compare/org/eclipse/compare/patch/WorkspacePatcherUI.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WorkspacePatcherUI.java 28 Mar 2006 13:49:17 -0000 1.1 --- WorkspacePatcherUI.java 5 Apr 2006 16:12:50 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + /******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ package org.eclipse.compare.patch; |
|
From: Matthias K <mat...@us...> - 2006-04-05 16:11:20
|
Update of /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.progressview/src/org/eclipse/ui/internal/progress In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12939/src/org/eclipse/ui/internal/progress Modified Files: ProgressRegion.java Log Message: Updated to Eclipse 3.2 M6 Index: ProgressRegion.java =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.progressview/src/org/eclipse/ui/internal/progress/ProgressRegion.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProgressRegion.java 19 Mar 2006 20:57:56 -0000 1.1 --- ProgressRegion.java 5 Apr 2006 16:11:03 -0000 1.2 *************** *** 20,26 **** import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; - import org.eclipse.ui.IWindowTrim; import org.eclipse.ui.internal.WorkbenchMessages; import org.eclipse.ui.internal.WorkbenchWindow; /** --- 20,26 ---- import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.ui.internal.WorkbenchMessages; import org.eclipse.ui.internal.WorkbenchWindow; + import org.eclipse.ui.internal.layout.IWindowTrim; /** |
|
From: Matthias K <mat...@us...> - 2006-03-28 17:20:22
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28172 Added Files: .cvsignore Log Message: --- NEW FILE: .cvsignore --- bin jcmdapp.jar temp.folder jcmdappsrc.zip |
|
From: Matthias K <mat...@us...> - 2006-03-28 17:16:48
|
Update of /cvsroot/jcommander/plugins/org.jcommander.eclipseplatform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26175 Modified Files: feature.xml Log Message: First implementation of a diff view (Feature request 1115411) Index: feature.xml =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.eclipseplatform/feature.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** feature.xml 20 Mar 2006 12:10:33 -0000 1.17 --- feature.xml 28 Mar 2006 17:16:44 -0000 1.18 *************** *** 23,34 **** <requires> - <import plugin="org.eclipse.osgi"/> - <import plugin="org.eclipse.update.configurator"/> - <import plugin="org.eclipse.help"/> - <import plugin="org.eclipse.jface"/> - <import plugin="org.eclipse.ui"/> - <import plugin="org.eclipse.swt"/> - <import plugin="org.eclipse.core.commands"/> <import plugin="org.eclipse.core.runtime"/> </requires> --- 23,42 ---- <requires> <import plugin="org.eclipse.core.runtime"/> + <import plugin="org.eclipse.update.configurator"/> + <import plugin="org.eclipse.help" version="3.1.0" match="compatible"/> + <import plugin="org.eclipse.core.runtime" version="3.1.0" match="compatible"/> + <import plugin="org.eclipse.jface" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.ui" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.help" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.core.expressions" version="3.1.0" match="compatible"/> + <import plugin="org.eclipse.core.runtime" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.swt" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.core.commands" version="3.2.0" match="compatible"/> + <import plugin="org.eclipse.equinox.common" version="1.0.0" match="compatible"/> + <import plugin="org.eclipse.update.configurator" version="3.1.0" match="compatible"/> + <import plugin="org.eclipse.core.jobs"/> + <import plugin="org.eclipse.ui" version="3.1.0" match="compatible"/> + <import plugin="org.eclipse.ui.workbench.texteditor" version="3.1.0" match="compatible"/> </requires> *************** *** 260,262 **** --- 268,291 ---- unpack="false"/> + <plugin + id="org.jcommander.eclipsepatch.compare" + download-size="0" + install-size="0" + version="3.2.0" + unpack="false"/> + + <plugin + id="org.eclipse.ui.workbench.texteditor" + download-size="0" + install-size="0" + version="3.2.0.v20060216-0800" + unpack="false"/> + + <plugin + id="org.eclipse.core.contenttype" + download-size="0" + install-size="0" + version="3.2.0.v20060215a" + unpack="false"/> + </feature> |
|
From: Matthias K <mat...@us...> - 2006-03-28 17:16:44
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.filepanel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26135 Modified Files: plugin.xml Log Message: First implementation of a diff view (Feature request 1115411) Index: plugin.xml =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.ui.filepanel/plugin.xml,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** plugin.xml 15 Feb 2006 10:43:58 -0000 1.38 --- plugin.xml 28 Mar 2006 17:16:40 -0000 1.39 *************** *** 24,27 **** --- 24,29 ---- <import plugin="org.jcommander.phileas.bookmarks"/> <import plugin="org.jcommander.vfsextensions"/> + <import plugin="org.jcommander.eclipsepatch.compare"/> + <import plugin="org.jcommander.ui.compare"/> </requires> <extension-point id="FilePanelManager" name="A manager for file tabs." schema="schema/FilePanelManager.exsd"/> |
|
From: Matthias K <mat...@us...> - 2006-03-28 17:16:43
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.filepanel/src/org/jcommander/ui/filepanel/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26135/src/org/jcommander/ui/filepanel/actions Added Files: CompareAction.java Log Message: First implementation of a diff view (Feature request 1115411) --- NEW FILE: CompareAction.java --- /** * */ package org.jcommander.ui.filepanel.actions; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.reflect.InvocationTargetException; import org.apache.commons.vfs.*; import org.eclipse.compare.*; import org.eclipse.compare.structuremergeviewer.DiffNode; import org.eclipse.compare.structuremergeviewer.Differencer; import org.eclipse.compare.structuremergeviewer.IStructureComparator; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.program.Program; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.WorkbenchException; import org.jcommander.compare.ComparePlugin; import org.jcommander.compare.CompareTest; import org.jcommander.compare.perspective.ComparePerspectiveFactory; import org.jcommander.ui.filepanel.FilePanelManagerProvider; import org.jcommander.ui.filepanel.controls.FileTab; import org.jcommander.ui.utils.EclipseBroker; import org.jcommander.ui.utils.ImageBroker; import org.jcommander.ui.utils.MessageDisplayer; /** * @author MatthiasK * */ public class CompareAction implements IWorkbenchWindowActionDelegate { /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ public void dispose() { // TODO Auto-generated method stub } // private static class FileInput implements IStructureComparator, ITypedElement, IStreamContentAccessor, IEditableContent { // // private File file; // /** // * // */ // // public String base; // // //protected static final ImageRegistry imgRegistry = new ImageRegistry(); // // public boolean equals(Object other) { // if (other instanceof ITypedElement) // return getName().equals(((ITypedElement) other).getName()); // return super.equals(other); // } // // public int hashCode() { // return getName().hashCode(); // } // // public FileInput(File file, String base) { // // TODO Auto-generated constructor stub // System.out.println(file.getName()); // this.file=file; // this.base=base; // } // // /* (non-Javadoc) // * @see org.eclipse.compare.structuremergeviewer.IStructureComparator#getChildren() // */ // public Object[] getChildren() { // //System.out.println("getchildren"); // if (file.listFiles()==null) // { // //System.out.println("Keine Kinder"); // return null; // // } // //System.out.println("Kinder->"); // //ArrayList list = new ArrayList(); // Object[] children= new Object[file.listFiles().length]; // File[] filelist = file.listFiles(); // // for (int i = 0; i < filelist.length; i++) { // //list.add(new FileInput(filelist[i])); // children[i]=new FileInput(filelist[i],base); // } // return children;//list.toArray(); // } // // /* (non-Javadoc) // * @see org.eclipse.compare.ITypedElement#getName() // */ // public String getName() { // //return file.getAbsolutePath().substring(base.length()); // return file.getName(); // } // // public Image getIconFromProgram(Program program) { // Image image;// = (Image) imgRegistry.get(program.getName()); // //if (image == null) { // ImageData imageData = program.getImageData(); // if (imageData != null) { // image = new Image(null, imageData, imageData.getTransparencyMask()); // //imgRegistry.put(program.getName(), image); // } else { // image = ImageBroker.FILE_ICON; // } // //} // return image; // } // // /* (non-Javadoc) // * @see org.eclipse.compare.ITypedElement#getImage() // */ // public Image getImage() { // Image iconImage = null; // if (file.isDirectory()) return ImageBroker.FOLDER_ICON; // int dot = file.getName().lastIndexOf('.'); // if (dot != -1) { // String extension = file.getName().substring(dot); // Program program = Program.findProgram(extension); // if (program != null) { // //typeString = program.getName(); // //typeString = extension.toUpperCase(); // iconImage = getIconFromProgram(program); // } else { // iconImage = ImageBroker.FILE_ICON; // } // } else { // iconImage = ImageBroker.FILE_ICON; // } // return iconImage; // } // // /* (non-Javadoc) // * @see org.eclipse.compare.ITypedElement#getType() // */ // public String getType() { // // TODO Auto-generated method stub // if (file.isDirectory()){ // System.out.println(FOLDER_TYPE); // return FOLDER_TYPE; // } // else { // String name=file.getName(); // int dot=name.lastIndexOf('.'); // String type=name.substring(dot+1); // System.out.println(type); // return type; // } // //System.out.println((file.isDirectory())?FOLDER_TYPE:TEXT_TYPE); // //return (file.isDirectory())?FOLDER_TYPE:TEXT_TYPE; // } // // /* (non-Javadoc) // * @see org.eclipse.compare.IStreamContentAccessor#getContents() // */ // public InputStream getContents() throws CoreException { // // TODO Auto-generated method stub // if (file.isDirectory()) return null; // try { // return new FileInputStream(file); // } catch (FileNotFoundException e) { // // TODO Auto-generated catch block // e.printStackTrace(); // } // return null; // } // // public boolean isEditable() { // // TODO Auto-generated method stub // return true; // } // // public void setContent(byte[] newContent) { // // TODO Auto-generated method stub // // } // // public ITypedElement replace(ITypedElement dest, ITypedElement src) { // // TODO Auto-generated method stub // return null; // } // // } /** * * @author MatthiasK * FileInput encapsulates an FileObject into an class the * eclipse comparefunctions are able to use. */ private static class FileInput implements IStructureComparator, ITypedElement, IStreamContentAccessor, IEditableContent { /** * The FileObject this FileInput represents */ private FileObject file; /** * The basedirectory from which we are comparing. * Not any longer needed, just not yet removed. */ public String base; //protected static final ImageRegistry imgRegistry = new ImageRegistry(); public boolean equals(Object other) { if (other instanceof ITypedElement) return getName().equals(((ITypedElement) other).getName()); return super.equals(other); } public int hashCode() { return getName().hashCode(); } public FileInput(FileObject file, String base) { //System.out.println(file.getName()); this.file=file; this.base=base; } public FileInput(FileObject file) { System.out.println(file.getName()); this.file=file; this.base=""; } /* (non-Javadoc) * @see org.eclipse.compare.structuremergeviewer.IStructureComparator#getChildren() */ public Object[] getChildren() { //System.out.println("getchildren"); try { if (file.getChildren()==null) { return null; } } catch (FileSystemException e) { return null; } Object[] children=null; FileObject[] filelist=null; try { children= new Object[file.getChildren().length]; filelist = file.getChildren(); } catch (FileSystemException e) { e.printStackTrace(); } for (int i = 0; i < filelist.length; i++) { children[i]=new FileInput(filelist[i],base); } return children; } /* (non-Javadoc) * @see org.eclipse.compare.ITypedElement#getName() */ public String getName() { //return file.getAbsolutePath().substring(base.length()); return file.getName().getBaseName(); } private Image getIconFromProgram(Program program) { Image image;// = (Image) imgRegistry.get(program.getName()); //if (image == null) { ImageData imageData = program.getImageData(); if (imageData != null) { image = new Image(null, imageData, imageData.getTransparencyMask()); //imgRegistry.put(program.getName(), image); } else { image = ImageBroker.FILE_ICON; } //} return image; } /* (non-Javadoc) * @see org.eclipse.compare.ITypedElement#getImage() */ public Image getImage() { Image iconImage = null; try { if (file.getType()==FileType.FOLDER) return ImageBroker.FOLDER_ICON; } catch (FileSystemException e) { // TODO Auto-generated catch block e.printStackTrace(); } int dot = file.getName().getBaseName().lastIndexOf('.'); if (dot != -1) { String extension = file.getName().getBaseName().substring(dot); Program program = Program.findProgram(extension); if (program != null) { //typeString = program.getName(); //typeString = extension.toUpperCase(); iconImage = getIconFromProgram(program); } else { iconImage = ImageBroker.FILE_ICON; } } else { iconImage = ImageBroker.FILE_ICON; } return iconImage; } /* (non-Javadoc) * @see org.eclipse.compare.ITypedElement#getType() */ public String getType() { // TODO Auto-generated method stub try { if (file.getType()==FileType.FOLDER) { return FOLDER_TYPE; } else { String name=file.getName().getBaseName(); int dot=name.lastIndexOf('.'); return name.substring(dot+1); } //System.out.println((file.getType()==FileType.FOLDER)?FOLDER_TYPE:TEXT_TYPE); //return (file.getType()==FileType.FOLDER)?FOLDER_TYPE:TEXT_TYPE; } catch (FileSystemException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } /* (non-Javadoc) * @see org.eclipse.compare.IStreamContentAccessor#getContents() */ public InputStream getContents() throws CoreException { // TODO Auto-generated method stub try { if (file.getType()==FileType.FOLDER) return null; return file.getContent().getInputStream(); } catch (FileSystemException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } return null; } public boolean isEditable() { // TODO Auto-generated method stub return true; } public void setContent(byte[] newContent) { // TODO Auto-generated method stub try { System.out.println("setContent"); String nC=new String(newContent); System.out.println(nC); OutputStream oStream=file.getContent().getOutputStream(); oStream.write(nC.getBytes()); oStream.close(); } catch (FileSystemException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public ITypedElement replace(ITypedElement dest, ITypedElement src) { // TODO Implement! // if ((dest==null)&&(src!=null)) { // System.out.println("Add: "+((FileInput)src).file.getName().getURI()); // } else if ((dest!=null)&&(src==null)) { // System.out.println("Remove: "+((FileInput)src).file.getName().getURI()); // } System.out.println("replace"); try{ if (dest!=null) { if (dest instanceof FileInput) { FileInput fDest = (FileInput) dest; if (src==null) { fDest.file.delete(); } else if (src instanceof FileInput) { FileInput fSrc = (FileInput) src; fDest.file.copyFrom(fSrc.file, null); return fDest; } else { System.out.println("Error in FileInput.replace: Src no FileInput"); } } else { System.out.println("Error in FileInput.replace: Dest no FileInput"); } } else if (src!=null) { if (src instanceof FileInput) { FileInput fSrc = (FileInput) src; FileObject fDest=file.resolveFile(fSrc.file.getName().getBaseName()); System.out.println("Copying to "+fDest.getName().getURI()); fDest.copyFrom(fSrc.file,new AllFileSelector()); return new FileInput(fDest,base); } else { System.out.println("Error in FileInput.replace: Src no FileInput"); } } else { System.out.println("Error in FileInput.replace: Src and Dest null"); } } catch (FileSystemException e) { // TODO: handle exception e.printStackTrace(); } return null; } } /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ public void init(IWorkbenchWindow window) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ public void run(IAction action) { /* * Code below copied from CompareByContentAction */ boolean error = true; FileTab tab = FilePanelManagerProvider .getTabManager() .getActiveTabMediator() .getFileTab(); /* Try to find a two file selection in the active panel */ FileObject leftFile = null; FileObject rightFile = null; //TODO: Unnecessary loop? FilePanel.getPanelMediator().getFilePanel()??? FileObject[] selectedFiles = tab.getActiveFilePanel() .getPanelMediator() .getFilePanel() .getFileControl() .getSelectedFiles(); if(selectedFiles.length == 2) { error = false; // We have found an exact selection in the active panel leftFile = selectedFiles[0]; rightFile = selectedFiles[1]; } else if(selectedFiles.length == 1){ // Try to find a matching file in the other panel selectedFiles = tab.getLeftFilePanel() .getPanelMediator() .getFilePanel() .getFileControl() .getSelectedFiles(); FileObject[] otherSelectedFiles = tab.getRightFilePanel() .getPanelMediator() .getFilePanel() .getFileControl() .getSelectedFiles(); if((otherSelectedFiles.length ==1)&&(selectedFiles.length ==1)) { error = false; leftFile = selectedFiles[0]; rightFile = otherSelectedFiles[0]; } } final FileObject fLeftFile=leftFile; final FileObject fRightFile=rightFile; if(!error) { try { IWorkbenchPage page = PlatformUI.getWorkbench().showPerspective(ComparePlugin.COMPARE_PERSPECTIVE_ID, EclipseBroker.getWorkbenchWindow()); } catch (WorkbenchException e) { // TODO Auto-generated catch block e.printStackTrace(); } CompareConfiguration cc = new CompareConfiguration() { /* (non-Javadoc) * @see org.eclipse.compare.CompareConfiguration#getRightLabel(java.lang.Object) */ @Override public String getRightLabel(Object element) { if (element!=null) { DiffNode diffNode = (DiffNode) element; if ((diffNode.getRight()!=null)&&(diffNode.getRight() instanceof FileInput)) { FileInput file = (FileInput) diffNode.getRight(); return file.file.getName().getURI(); } return super.getRightLabel(element); } else return super.getRightLabel(element); } /* (non-Javadoc) * @see org.eclipse.compare.CompareConfiguration#getLeftLabel(java.lang.Object) */ @Override public String getLeftLabel(Object element) { if (element!=null) { DiffNode diffNode = (DiffNode) element; if ((diffNode.getLeft()!=null)&&(diffNode.getLeft() instanceof FileInput)) { FileInput file = (FileInput) diffNode.getLeft(); return file.file.getName().getURI(); } return super.getLeftLabel(element); } else return super.getLeftLabel(element); } }; cc.setLeftEditable(true); cc.setRightEditable(true); CompareEditorInput input = new CompareEditorInput(cc) { protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { Object fRoot; Differencer d = new Differencer(); //System.out.println("Finding diffs"); fRoot = d.findDifferences(false,monitor,null,null, new FileInput(fLeftFile), new FileInput(fRightFile)); //System.out.println("found diffs"); return fRoot; } }; CompareUI.openCompareEditor(input); } else { MessageDisplayer.setStatusErrorMessage("Could not find suitable selections for performing diff"); } } /* (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ public void selectionChanged(IAction action, ISelection selection) { // TODO Auto-generated method stub } } |
|
From: Matthias K <mat...@us...> - 2006-03-28 17:16:38
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26111 Modified Files: plugin.xml Log Message: First implementation of a diff view (Feature request 1115411) Index: plugin.xml =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.ui.app/plugin.xml,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** plugin.xml 19 Mar 2006 21:03:45 -0000 1.93 --- plugin.xml 28 Mar 2006 17:16:34 -0000 1.94 *************** *** 36,39 **** --- 36,40 ---- <import plugin="org.jcommander.ui.fileviewer"/> <import plugin="org.jcommander.eclipsepatch.progressview"/> + <import plugin="org.jcommander.ui.compare"/> </requires> <extension id="JCmdApplication" name="%applicationName" *************** *** 364,367 **** --- 365,373 ---- menubarPath="jcmdoperationsmenu/Operations.groupMarker1" id="org.jcommander.ui.app.actions.renameFiles" /> + <action label="&Compare" + definitionId="org.jcommander.ui.app.CompareCommand" + class="org.jcommander.ui.filepanel.actions.CompareAction" + menubarPath="jcmdoperationsmenu/Operations.groupMarker1" + id="org.jcommander.ui.app.actions.compare" /> <action label="&Make Directory" definitionId="org.jcommander.ui.app.MkDirCommand" *************** *** 703,706 **** --- 709,719 ---- keyConfigurationId="org.jcommander.ui.app.JCmdKeyConfiguration" keySequence="Shift+F6" /> + <command description="Compares two files/directories" + categoryId="org.jcommander.ui.app.categories.Tabs" name="Compare" + id="org.jcommander.ui.app.CompareCommand" /> + <keyBinding contextId="org.eclipse.ui.contexts.dialogAndWindow" + commandId="org.jcommander.ui.app.CompareCommand" + keyConfigurationId="org.jcommander.ui.app.JCmdKeyConfiguration" + keySequence="F10" /> <command description="Creates a new directory." categoryId="org.jcommander.ui.app.categories.Tabs" |
|
From: Matthias K <mat...@us...> - 2006-03-28 17:16:32
|
Update of /cvsroot/jcommander/plugins/org.jcommander In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26086 Modified Files: feature.xml Log Message: First implementation of a diff view (Feature request 1115411) Index: feature.xml =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander/feature.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** feature.xml 2 Mar 2006 09:32:10 -0000 1.11 --- feature.xml 28 Mar 2006 17:16:27 -0000 1.12 *************** *** 284,286 **** --- 284,293 ---- version="0.7.1"/> + <plugin + id="org.jcommander.ui.compare" + download-size="0" + install-size="0" + version="0.7.1" + unpack="false"/> + </feature> |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:54
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9650/src/org/jcommander/compare Added Files: ComparePlugin.java CompareTest.java Log Message: JCommander compare support --- NEW FILE: ComparePlugin.java --- package org.jcommander.compare; import java.io.InputStream; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.program.Program; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.WorkbenchException; import org.eclipse.ui.plugin.*; import org.eclipse.compare.IStreamContentAccessor; import org.eclipse.compare.ITypedElement; import org.eclipse.compare.structuremergeviewer.IStructureComparator; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.resource.ImageDescriptor; import org.jcommander.ui.utils.EclipseBroker; import org.jcommander.ui.utils.ImageBroker; import org.osgi.framework.BundleContext; import org.apache.commons.vfs.*; /** * The main plugin class to be used in the desktop. */ public class ComparePlugin extends AbstractUIPlugin { //The shared instance. private static ComparePlugin plugin; public static final String COMPARE_PERSPECTIVE_ID = "org.jcommander.compare.Compare"; /** * * @author MatthiasK * FileInput encapsulates an FileObject into an class the * eclipse comparefunctions are able to use. */ private static class FileInput implements IStructureComparator, ITypedElement, IStreamContentAccessor { /** * The FileObject this FileInput represents */ private FileObject file; /** * The basedirectory from which we are comparing. * Not any longer needed, just not yet removed. */ public String base; //protected static final ImageRegistry imgRegistry = new ImageRegistry(); public boolean equals(Object other) { if (other instanceof ITypedElement) return getName().equals(((ITypedElement) other).getName()); return super.equals(other); } public int hashCode() { return getName().hashCode(); } public FileInput(FileObject file, String base) { //System.out.println(file.getName()); this.file=file; this.base=base; } public FileInput(FileObject file) { System.out.println(file.getName()); this.file=file; this.base=""; } /* (non-Javadoc) * @see org.eclipse.compare.structuremergeviewer.IStructureComparator#getChildren() */ public Object[] getChildren() { //System.out.println("getchildren"); try { if (file.getChildren()==null) { return null; } } catch (FileSystemException e) { return null; } Object[] children=null; FileObject[] filelist=null; try { children= new Object[file.getChildren().length]; filelist = file.getChildren(); } catch (FileSystemException e) { e.printStackTrace(); } for (int i = 0; i < filelist.length; i++) { children[i]=new FileInput(filelist[i],base); } return children; } /* (non-Javadoc) * @see org.eclipse.compare.ITypedElement#getName() */ public String getName() { //return file.getAbsolutePath().substring(base.length()); return file.getName().getBaseName(); } private Image getIconFromProgram(Program program) { Image image;// = (Image) imgRegistry.get(program.getName()); //if (image == null) { ImageData imageData = program.getImageData(); if (imageData != null) { image = new Image(null, imageData, imageData.getTransparencyMask()); //imgRegistry.put(program.getName(), image); } else { image = ImageBroker.FILE_ICON; } //} return image; } /* (non-Javadoc) * @see org.eclipse.compare.ITypedElement#getImage() */ public Image getImage() { Image iconImage = null; try { if (file.getType()==FileType.FOLDER) return ImageBroker.FOLDER_ICON; } catch (FileSystemException e) { // TODO Auto-generated catch block e.printStackTrace(); } int dot = file.getName().getBaseName().lastIndexOf('.'); if (dot != -1) { String extension = file.getName().getBaseName().substring(dot); Program program = Program.findProgram(extension); if (program != null) { //typeString = program.getName(); //typeString = extension.toUpperCase(); iconImage = getIconFromProgram(program); } else { iconImage = ImageBroker.FILE_ICON; } } else { iconImage = ImageBroker.FILE_ICON; } return iconImage; } /* (non-Javadoc) * @see org.eclipse.compare.ITypedElement#getType() */ public String getType() { // TODO Auto-generated method stub try { System.out.println((file.getType()==FileType.FOLDER)?FOLDER_TYPE:TEXT_TYPE); return (file.getType()==FileType.FOLDER)?FOLDER_TYPE:TEXT_TYPE; } catch (FileSystemException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } /* (non-Javadoc) * @see org.eclipse.compare.IStreamContentAccessor#getContents() */ public InputStream getContents() throws CoreException { // TODO Auto-generated method stub try { if (file.getType()==FileType.FOLDER) return null; return file.getContent().getInputStream(); } catch (FileSystemException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } return null; } } /** * The constructor. */ public ComparePlugin() { plugin = this; } /** * This method is called upon plug-in activation */ public void start(BundleContext context) throws Exception { super.start(context); } /** * This method is called when the plug-in is stopped */ public void stop(BundleContext context) throws Exception { super.stop(context); plugin = null; } /** * Returns the shared instance. * * @return the shared instance. */ public static ComparePlugin getDefault() { return plugin; } /** * Returns an image descriptor for the image file at the given * plug-in relative path. * * @param path the path * @return the image descriptor */ public static ImageDescriptor getImageDescriptor(String path) { return AbstractUIPlugin.imageDescriptorFromPlugin("org.jcommander.compare", path); } public void compare(FileObject left, FileObject right){ try { IWorkbenchPage page = PlatformUI.getWorkbench().showPerspective(COMPARE_PERSPECTIVE_ID, EclipseBroker.getWorkbenchWindow()); System.out.println("Compare!!!"); } catch (WorkbenchException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("ComparePlugin"); } } --- NEW FILE: CompareTest.java --- /** * */ package org.jcommander.compare; /** * @author MatthiasK * */ public class CompareTest { public static void compare(){ System.out.println("CompareTest"); } } |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:54
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9650 Added Files: build.properties .classpath plugin.xml .project Log Message: JCommander compare support --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>org.jcommander.ui.compare</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.pde.ManifestBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.pde.SchemaBuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> --- NEW FILE: build.properties --- source.. = src/ output.. = bin/ bin.includes = plugin.xml,\ META-INF/,\ . --- NEW FILE: plugin.xml --- <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin> <extension point="org.eclipse.ui.preferencePages"> <page name="Compare Preferences" class="org.jcommander.compare.preferences.ComparePreferencePage" id="org.jcommander.compare.preferences.ComparePreferencePage"> </page> </extension> <extension point="org.eclipse.core.runtime.preferences"> <initializer class="org.jcommander.compare.preferences.PreferenceInitializer"> </initializer> </extension> <extension point="org.eclipse.ui.perspectives"> <perspective id="org.jcommander.compare.Compare" class="org.jcommander.compare.perspective.ComparePerspectiveFactory" name="Compare" /> </extension> </plugin> --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="lib" path="/org.apache.commons.vfs/commons-vfs-1.0-RC8-SNAPSHOT.jar"/> <classpathentry kind="output" path="bin"/> </classpath> |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:54
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9650/src/org/jcommander/compare/preferences Added Files: PreferenceInitializer.java PreferenceConstants.java ComparePreferencePage.java Log Message: JCommander compare support --- NEW FILE: PreferenceConstants.java --- package org.jcommander.compare.preferences; /** * Constant definitions for plug-in preferences */ public class PreferenceConstants { public static final String P_PATH = "pathPreference"; public static final String P_BOOLEAN = "booleanPreference"; public static final String P_CHOICE = "choicePreference"; public static final String P_STRING = "stringPreference"; } --- NEW FILE: ComparePreferencePage.java --- package org.jcommander.compare.preferences; import org.eclipse.jface.preference.*; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.IWorkbench; import org.jcommander.compare.ComparePlugin; /** * This class represents a preference page that * is contributed to the Preferences dialog. By * subclassing <samp>FieldEditorPreferencePage</samp>, we * can use the field support built into JFace that allows * us to create a page that is small and knows how to * save, restore and apply itself. * <p> * This page is used to modify preferences only. They * are stored in the preference store that belongs to * the main plug-in class. That way, preferences can * be accessed directly via the preference store. */ public class ComparePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { public ComparePreferencePage() { super(GRID); setPreferenceStore(ComparePlugin.getDefault().getPreferenceStore()); setDescription("A demonstration of a preference page implementation"); } /** * Creates the field editors. Field editors are abstractions of * the common GUI blocks needed to manipulate various types * of preferences. Each field editor knows how to save and * restore itself. */ public void createFieldEditors() { addField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, "&Directory preference:", getFieldEditorParent())); addField( new BooleanFieldEditor( PreferenceConstants.P_BOOLEAN, "&An example of a boolean preference", getFieldEditorParent())); addField(new RadioGroupFieldEditor( PreferenceConstants.P_CHOICE, "An example of a multiple-choice preference", 1, new String[][] { { "&Choice 1", "choice1" }, { "C&hoice 2", "choice2" } }, getFieldEditorParent())); addField( new StringFieldEditor(PreferenceConstants.P_STRING, "A &text preference:", getFieldEditorParent())); } /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) */ public void init(IWorkbench workbench) { } } --- NEW FILE: PreferenceInitializer.java --- package org.jcommander.compare.preferences; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.jface.preference.IPreferenceStore; import org.jcommander.compare.ComparePlugin; /** * Class used to initialize default preference values. */ public class PreferenceInitializer extends AbstractPreferenceInitializer { /* * (non-Javadoc) * * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() */ public void initializeDefaultPreferences() { IPreferenceStore store = ComparePlugin.getDefault() .getPreferenceStore(); store.setDefault(PreferenceConstants.P_BOOLEAN, true); store.setDefault(PreferenceConstants.P_CHOICE, "choice2"); store.setDefault(PreferenceConstants.P_STRING, "Default value"); } } |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:54
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare/perspective In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9650/src/org/jcommander/compare/perspective Added Files: ComparePerspectiveFactory.java Log Message: JCommander compare support --- NEW FILE: ComparePerspectiveFactory.java --- /** * */ package org.jcommander.compare.perspective; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; /** * @author MatthiasK * */ public class ComparePerspectiveFactory implements IPerspectiveFactory { /* (non-Javadoc) * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout) */ public void createInitialLayout(IPageLayout layout) { // TODO Auto-generated method stub layout.setEditorAreaVisible(true); } } |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:54
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9650/META-INF Added Files: MANIFEST.MF Log Message: JCommander compare support --- NEW FILE: MANIFEST.MF --- Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Compare Plug-in Bundle-SymbolicName: org.jcommander.ui.compare;singleton:=true Bundle-Version: 0.7.1 Bundle-Activator: org.jcommander.compare.ComparePlugin Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.apache.commons.vfs, org.jcommander.eclipsepatch.compare, org.jcommander.ui.utils Eclipse-LazyStart: true |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:50
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9568/src/org Log Message: Directory /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org added to the repository |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:49
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9568/src/org/jcommander/compare/preferences Log Message: Directory /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare/preferences added to the repository |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:48
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9568/src/org/jcommander/compare Log Message: Directory /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare added to the repository |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:48
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare/perspective In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9568/src/org/jcommander/compare/perspective Log Message: Directory /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander/compare/perspective added to the repository |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:46
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9568/META-INF Log Message: Directory /cvsroot/jcommander/plugins/org.jcommander.ui.compare/META-INF added to the repository |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:46
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9568/src/org/jcommander Log Message: Directory /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src/org/jcommander added to the repository |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:46
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9568/src Log Message: Directory /cvsroot/jcommander/plugins/org.jcommander.ui.compare/src added to the repository |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:54:28
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.compare In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9443/org.jcommander.ui.compare Log Message: Directory /cvsroot/jcommander/plugins/org.jcommander.ui.compare added to the repository |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:49:31
|
Update of /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.compare/icons/full/eview16 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5127/icons/full/eview16 Added Files: compare_view.gif Log Message: org.eclipse.compare, extracted from the Eclipse CVS. Now independent of org.eclipse.ui.ide etc. --- NEW FILE: compare_view.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:49:29
|
Update of /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.compare/compare/org/eclipse/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5127/compare/org/eclipse/ui/actions Added Files: WorkspaceModifyOperation.java Log Message: org.eclipse.compare, extracted from the Eclipse CVS. Now independent of org.eclipse.ui.ide etc. --- NEW FILE: WorkspaceModifyOperation.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.ui.actions; import java.lang.reflect.InvocationTargetException; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRunnable; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.operation.IThreadListener; //import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; /** * An operation which potentially makes changes to the workspace. All resource * modification should be performed using this operation. The primary * consequence of using this operation is that events which typically occur as a * result of workspace changes (such as the firing of resource deltas, * performance of autobuilds, etc.) are deferred until the outermost operation * has successfully completed. * <p> * If a scheduling rule is provided, the operation will obtain that scheduling * rule for the duration of its <code>execute</code> method. If no scheduling * rule is provided, the operation will obtain a scheduling rule that locks * the entire workspace for the duration of the operation. * </p> * <p> * Subclasses must implement <code>execute</code> to do the work of the * operation. * </p> * @see ISchedulingRule * @see org.eclipse.core.resources.IWorkspace#run(IWorkspaceRunnable, IProgressMonitor) * */ public abstract class WorkspaceModifyOperation implements IRunnableWithProgress, IThreadListener { private ISchedulingRule rule; /** * Creates a new operation. */ protected WorkspaceModifyOperation() { this(ResourcesPlugin.getWorkspace().getRoot()); } /** * Creates a new operation that will run using the provided * scheduling rule. * @param rule The ISchedulingRule to use or <code>null</code>. * @since 3.0 */ protected WorkspaceModifyOperation(ISchedulingRule rule) { this.rule = rule; } /** * Performs the steps that are to be treated as a single logical workspace * change. * <p> * Subclasses must implement this method. * </p> * * @param monitor the progress monitor to use to display progress and field * user requests to cancel * @exception CoreException if the operation fails due to a CoreException * @exception InvocationTargetException if the operation fails due to an exception other than CoreException * @exception InterruptedException if the operation detects a request to cancel, * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing * <code>InterruptedException</code>. It is also possible to throw * <code>OperationCanceledException</code>, which gets mapped to <code>InterruptedException</code> * by the <code>run</code> method. */ protected abstract void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException; /** * The <code>WorkspaceModifyOperation</code> implementation of this * <code>IRunnableWithProgress</code> method initiates a batch of changes by * invoking the <code>execute</code> method as a workspace runnable * (<code>IWorkspaceRunnable</code>). */ public synchronized final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { final InvocationTargetException[] iteHolder = new InvocationTargetException[1]; try { IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable() { public void run(IProgressMonitor pm) throws CoreException { try { execute(pm); } catch (InvocationTargetException e) { // Pass it outside the workspace runnable iteHolder[0] = e; } catch (InterruptedException e) { // Re-throw as OperationCanceledException, which will be // caught and re-thrown as InterruptedException below. throw new OperationCanceledException(e.getMessage()); } // CoreException and OperationCanceledException are propagated } }; ResourcesPlugin.getWorkspace().run(workspaceRunnable, rule, IResource.NONE, monitor); } catch (CoreException e) { throw new InvocationTargetException(e); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } // Re-throw the InvocationTargetException, if any occurred if (iteHolder[0] != null) { throw iteHolder[0]; } } /* (non-Javadoc) * @see IThreadListener#threadChange(Thread); * @since 3.2 */ public void threadChange(Thread thread) { //we must make sure we aren't transferring control away from a thread that //already owns a scheduling rule because this is deadlock prone (bug 105491) if (rule == null) return; Job currentJob = Platform.getJobManager().currentJob(); if (currentJob == null) return; ISchedulingRule currentRule = currentJob.getRule(); if (currentRule == null) return; throw new IllegalStateException("Cannot fork a thread from a thread owning a rule"); //$NON-NLS-1$ } } |
|
From: Matthias K <mat...@us...> - 2006-03-28 13:49:27
|
Update of /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.compare/icons/full/elcl16 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5127/icons/full/elcl16 Added Files: smartmode_co.gif ancestorpane_co.gif next_nav.gif syncpane_co.gif copycont_l_co.gif copy_l_co.gif copycont_r_co.gif copy_r_co.gif prev_nav.gif twowaycompare_co.gif Log Message: org.eclipse.compare, extracted from the Eclipse CVS. Now independent of org.eclipse.ui.ide etc. --- NEW FILE: copy_r_co.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: copy_l_co.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: copycont_r_co.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: prev_nav.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: smartmode_co.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: next_nav.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: syncpane_co.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ancestorpane_co.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: copycont_l_co.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: twowaycompare_co.gif --- (This appears to be a binary file; contents omitted.) |