[Pydev-cvs] org.python.pydev/src/org/python/pydev/ui/editors TreeWithAddRemove.java, 1.9, 1.10
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-09-28 12:46:01
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/ui/editors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4313/src/org/python/pydev/ui/editors Modified Files: TreeWithAddRemove.java Log Message: Synching to latest changes: Pydev <ul> <li><strong>Editor</strong>: Cursor settings no longer overridden</li> <li><strong>Code-completion</strong>: If __all__ is defined with runtime elements (and not only in a single assign statement), it's ignored for code-completion purposes</li> <li><strong>Debugger</strong>: Pythonpath the same in debug and regular modes (sys.path[0] is the same directory as the file run)</li> <li><strong>Debugger</strong>: Persist choices done in the debugger when files from the debugger are not found</li> <li><strong>Interpreter config</strong>: "email" automatically added to the "forced builtins"</li> <li><strong>Parser</strong>: Correctly recognizing absolute import with 3 or more levels</li> <li><strong>Syntax check</strong>: Option to do only on active editor</li> </ul> Also: tabs changed for spaces Index: TreeWithAddRemove.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/ui/editors/TreeWithAddRemove.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TreeWithAddRemove.java 14 Jun 2008 22:14:56 -0000 1.9 --- TreeWithAddRemove.java 28 Sep 2008 12:45:52 -0000 1.10 *************** *** 47,73 **** } ! GridLayout layout = new GridLayout(); ! layout.numColumns = 2; ! this.setLayout(layout); ! GridData data= new GridData(GridData.FILL_BOTH); ! this.project = project; ! ! tree = new Tree(this, SWT.BORDER ); ! data.grabExcessHorizontalSpace = true; ! data.grabExcessVerticalSpace = true; ! tree.setLayoutData(data); ! Composite buttonsSourceFolders= new Composite(this, SWT.NONE); ! buttonsSourceFolders.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING)); ! ! layout = new GridLayout(); ! layout.marginHeight= 0; ! layout.marginWidth= 0; ! buttonsSourceFolders.setLayout(layout); ! ! Button buttonAddSourceFolder = new Button(buttonsSourceFolders, SWT.PUSH); ! customizeAddSourceFolderButton(buttonAddSourceFolder, true); buttonAddSourceFolder.setText(getButtonAddText()); data = new GridData (); --- 47,73 ---- } ! GridLayout layout = new GridLayout(); ! layout.numColumns = 2; ! this.setLayout(layout); ! GridData data= new GridData(GridData.FILL_BOTH); ! this.project = project; ! ! tree = new Tree(this, SWT.BORDER ); ! data.grabExcessHorizontalSpace = true; ! data.grabExcessVerticalSpace = true; ! tree.setLayoutData(data); ! Composite buttonsSourceFolders= new Composite(this, SWT.NONE); ! buttonsSourceFolders.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING)); ! ! layout = new GridLayout(); ! layout.marginHeight= 0; ! layout.marginWidth= 0; ! buttonsSourceFolders.setLayout(layout); ! ! Button buttonAddSourceFolder = new Button(buttonsSourceFolders, SWT.PUSH); ! customizeAddSourceFolderButton(buttonAddSourceFolder, true); buttonAddSourceFolder.setText(getButtonAddText()); data = new GridData (); *************** *** 84,89 **** buttonAddZip.setLayoutData(data); ! Button buttonRemSourceFolder = new Button(buttonsSourceFolders, SWT.PUSH); ! customizeRemSourceFolderButton(buttonRemSourceFolder); data = new GridData (); data.horizontalAlignment = GridData.FILL; --- 84,89 ---- buttonAddZip.setLayoutData(data); ! Button buttonRemSourceFolder = new Button(buttonsSourceFolders, SWT.PUSH); ! customizeRemSourceFolderButton(buttonRemSourceFolder); data = new GridData (); data.horizontalAlignment = GridData.FILL; *************** *** 100,106 **** ! /** ! * Remove is almost always default ! * * @param buttonRemSourceFolder */ --- 100,106 ---- ! /** ! * Remove is almost always default ! * * @param buttonRemSourceFolder */ *************** *** 162,168 **** }else if(d instanceof SelectionDialog){ SelectionDialog dialog = (SelectionDialog) d; ! dialog.open(); ! Object[] objects = dialog.getResult(); ! if (objects != null) { for (int i = 0; i < objects.length; i++) { Object object = objects[i]; --- 162,168 ---- }else if(d instanceof SelectionDialog){ SelectionDialog dialog = (SelectionDialog) d; ! dialog.open(); ! Object[] objects = dialog.getResult(); ! if (objects != null) { for (int i = 0; i < objects.length; i++) { Object object = objects[i]; *************** *** 174,179 **** addTreeItem(pathAsString); }else if(object instanceof IFile){ ! //IMPORTANT: get it relative to the workspace root, and not to the project!! ! //(historical reasons) IFile p = (IFile) object; String pathAsString = getPathAsString(p.getProjectRelativePath()); --- 174,179 ---- addTreeItem(pathAsString); }else if(object instanceof IFile){ ! //IMPORTANT: get it relative to the workspace root, and not to the project!! ! //(historical reasons) IFile p = (IFile) object; String pathAsString = getPathAsString(p.getProjectRelativePath()); *************** *** 184,188 **** } } ! } }else{ throw new RuntimeException("Dont know how to treat dialog: "+d.getClass()); --- 184,188 ---- } } ! } }else{ throw new RuntimeException("Dont know how to treat dialog: "+d.getClass()); *************** *** 259,265 **** private void addTreeItem(String pathAsString) { if(pathAsString != null && pathAsString.trim().length() > 0){ ! TreeItem item = new TreeItem(tree, 0); ! item.setText(pathAsString); ! item.setImage(PydevPlugin.getImageCache().get(getImageConstant())); } } --- 259,265 ---- private void addTreeItem(String pathAsString) { if(pathAsString != null && pathAsString.trim().length() > 0){ ! TreeItem item = new TreeItem(tree, 0); ! item.setText(pathAsString); ! item.setImage(PydevPlugin.getImageCache().get(getImageConstant())); } } *************** *** 271,276 **** String text = items[i].getText(); if(text != null && text.trim().length() > 0){ ! ret.append(text); ! ret.append("|"); } } --- 271,276 ---- String text = items[i].getText(); if(text != null && text.trim().length() > 0){ ! ret.append(text); ! ret.append("|"); } } |