From e29cf6af39659c5a8632d584a7caee91d04d58e1 Mon Sep 17 00:00:00 2001 From: mxia Date: Fri, 24 Sep 2010 15:18:46 -0700 Subject: [PATCH 1/9] Updated Eclipse base to 3.6.1. --- builders/org.python.pydev.build/build_local.properties | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/builders/org.python.pydev.build/build_local.properties b/builders/org.python.pydev.build/build_local.properties index e60fb678b..ac15d3bcc 100644 --- a/builders/org.python.pydev.build/build_local.properties +++ b/builders/org.python.pydev.build/build_local.properties @@ -27,10 +27,14 @@ scs.branch.name=master red-core.p2.repo=/var/update-site/update/${scs.branch.name}/red-core deploy.dir=/var/update-site/update/${scs.branch.name}/pydev cleanAfter=true -# Eclipse 3.6 -vanilla.eclipse=/opt/eclipse_3.6 +# Eclipse 3.6.1 +vanilla.eclipse=/opt/eclipse_3.6.1 launcher.plugin=org.eclipse.equinox.launcher_1.1.0.v20100507 -builder.plugin=org.eclipse.pde.build_3.6.0.v20100603 +builder.plugin=org.eclipse.pde.build_3.6.1.R36x_v20100823 +# Eclipse 3.6 +#vanilla.eclipse=/opt/eclipse_3.6 +#launcher.plugin=org.eclipse.equinox.launcher_1.1.0.v20100507 +#builder.plugin=org.eclipse.pde.build_3.6.0.v20100603 # Eclipse 3.5 #launcher.plugin=org.eclipse.equinox.launcher_1.0.200.v20090520 #builder.plugin=org.eclipse.pde.build_3.5.0.v20090527-1800 From 04bbbaf11e789349ccb5d90de436b7941045a5d6 Mon Sep 17 00:00:00 2001 From: fabioz Date: Tue, 28 Sep 2010 09:23:19 -0300 Subject: [PATCH 2/9] Making source java 1.5 compliant. --- .../pydev/analysis/indexview/ElementWithChildren.java | 1 - .../pydev/analysis/indexview/ElementWithParent.java | 1 - .../pydev/analysis/indexview/ForcedLibGroup.java | 2 -- .../com/python/pydev/analysis/indexview/IndexRoot.java | 4 ---- .../pydev/analysis/indexview/InterpreterGroup.java | 1 - .../pydev/analysis/indexview/InterpretersGroup.java | 1 - .../python/pydev/analysis/indexview/LeafElement.java | 2 -- .../analysis/indexview/MisconfigurationElement.java | 1 - .../python/pydev/analysis/indexview/NatureGroup.java | 1 - .../python/pydev/analysis/indexview/ProjectsGroup.java | 1 - .../analysis/indexview/PyIndexContentProvider.java | 10 ++++------ .../python/pydev/analysis/indexview/PyIndexView.java | 2 -- plugins/com.python.pydev.docs/release_process.txt | 4 +++- .../django_templates/comon/parsing/DjTokenScanner.java | 4 ---- .../completions/DjContentAssistProcessor.java | 1 - .../pydev/django_templates/css/editor/DjCssEditor.java | 1 - .../django_templates/html/editor/DjHTMLEditor.java | 1 - .../pydev/editor/preferences/PydevEditorPrefs.java | 1 - .../PyCalltipsContextInformationFromIToken.java | 1 - 19 files changed, 7 insertions(+), 33 deletions(-) diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ElementWithChildren.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ElementWithChildren.java index c698f34a8..c4e822bf2 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ElementWithChildren.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ElementWithChildren.java @@ -14,7 +14,6 @@ public ElementWithChildren(ITreeElement parent) { private List calculatingChildren; private Object[] calculatedChildren; - @Override public Object[] getChildren() { if(calculatedChildren == null){ calculatingChildren = new ArrayList(); diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ElementWithParent.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ElementWithParent.java index dea08572c..612f627fc 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ElementWithParent.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ElementWithParent.java @@ -8,7 +8,6 @@ public ElementWithParent(ITreeElement parent){ this.parent = parent; } - @Override public ITreeElement getParent() { return this.parent; } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ForcedLibGroup.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ForcedLibGroup.java index dc9b2fc2f..2535ac20a 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ForcedLibGroup.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ForcedLibGroup.java @@ -21,7 +21,6 @@ public ForcedLibGroup(ITreeElement parent, InterpreterInfo interpreterInfo, Stri this.forcedLib = forcedLib; } - @Override public boolean hasChildren() { return true; } @@ -39,7 +38,6 @@ protected void calculateChildren() throws MisconfigurationException { } Collections.sort(lst, new Comparator() { - @Override public int compare(LeafElement o1, LeafElement o2) { return o1.toString().compareTo(o2.toString()); } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/IndexRoot.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/IndexRoot.java index f7a63a805..399626c71 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/IndexRoot.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/IndexRoot.java @@ -4,12 +4,10 @@ public class IndexRoot implements ITreeElement{ Object[] children = null; - @Override public boolean hasChildren() { return true; } - @Override public Object[] getChildren() { if(children == null){ children = new Object[]{new InterpretersGroup(this), new ProjectsGroup(this)}; @@ -17,12 +15,10 @@ public Object[] getChildren() { return children; } - @Override public ITreeElement getParent() { return null; //the root has no parent } - @Override public String toString() { return "Index"; } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/InterpreterGroup.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/InterpreterGroup.java index 4a9127d04..97cf95049 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/InterpreterGroup.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/InterpreterGroup.java @@ -16,7 +16,6 @@ public InterpreterGroup(ITreeElement parent, IInterpreterInfo interpreterInfo) { this.interpreterInfo = (InterpreterInfo) interpreterInfo; } - @Override public boolean hasChildren() { return true; } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/InterpretersGroup.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/InterpretersGroup.java index 3138cee5e..d33d10915 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/InterpretersGroup.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/InterpretersGroup.java @@ -10,7 +10,6 @@ public InterpretersGroup(ITreeElement parent) { super(parent); } - @Override public boolean hasChildren() { return true; } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/LeafElement.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/LeafElement.java index d748e2f85..db1bff24a 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/LeafElement.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/LeafElement.java @@ -11,12 +11,10 @@ public LeafElement(ITreeElement parent, Object o) { this.o = o; } - @Override public boolean hasChildren() { return false; } - @Override public Object[] getChildren() { return EMPTY; } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/MisconfigurationElement.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/MisconfigurationElement.java index 10c5d77e9..3a45a9c1e 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/MisconfigurationElement.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/MisconfigurationElement.java @@ -16,7 +16,6 @@ public String toString() { return e.toString(); } - @Override public boolean hasChildren() { return false; } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/NatureGroup.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/NatureGroup.java index 61d6297fd..7907a17e3 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/NatureGroup.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/NatureGroup.java @@ -51,7 +51,6 @@ public NatureGroup(ITreeElement parent, PythonNature nature) { this.nature = nature; } - @Override public boolean hasChildren() { return true; } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ProjectsGroup.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ProjectsGroup.java index 22c23e271..93a3b8edd 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ProjectsGroup.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/ProjectsGroup.java @@ -11,7 +11,6 @@ public ProjectsGroup(ITreeElement indexRoot) { super(indexRoot); } - @Override public boolean hasChildren() { return true; } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/PyIndexContentProvider.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/PyIndexContentProvider.java index ad04fb814..00b3a44fc 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/PyIndexContentProvider.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/PyIndexContentProvider.java @@ -5,30 +5,28 @@ public class PyIndexContentProvider implements ITreeContentProvider { - @Override public void dispose() { } - @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } - @Override + public Object[] getElements(Object inputElement) { return ((ITreeElement)inputElement).getChildren(); } - @Override + public Object[] getChildren(Object parentElement) { return ((ITreeElement)parentElement).getChildren(); } - @Override + public Object getParent(Object element) { return ((ITreeElement)element).getParent(); } - @Override + public boolean hasChildren(Object element) { return ((ITreeElement)element).hasChildren(); } diff --git a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/PyIndexView.java b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/PyIndexView.java index 05d29f73a..f01f96932 100644 --- a/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/PyIndexView.java +++ b/plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/indexview/PyIndexView.java @@ -22,14 +22,12 @@ public void createPartControl(Composite parent) { tree.addKeyListener(new KeyListener() { - @Override public void keyReleased(KeyEvent e) { if(e.keyCode == SWT.F5){ treeViewer.setInput(new IndexRoot()); } } - @Override public void keyPressed(KeyEvent e) { } }); diff --git a/plugins/com.python.pydev.docs/release_process.txt b/plugins/com.python.pydev.docs/release_process.txt index 84ff4d29e..6802f774f 100644 --- a/plugins/com.python.pydev.docs/release_process.txt +++ b/plugins/com.python.pydev.docs/release_process.txt @@ -56,7 +56,9 @@ git pull origin %BRANCH% cd builders\org.python.pydev.build set GIT_EXECUTABLE="d:\bin\git\bin\git.exe" set KEYSTORE=W:\git_deploy_dir\pydevkeystore -ant -DbuildDirectory=W:\git_build_dir\Pydev -Dbaseos=win32 -Dbasews=win32 -Dgit.executable=%GIT_EXECUTABLE% -Dbasearch=x86 -Ddeploy.dir=w:\git_deploy_dir\Pydev -DcleanAfter=false -Dvanilla.eclipse=D:\bin\eclipse_36_final_clean -DSTOREPASS=%STOREPASS% -DKEYSTORE=%KEYSTORE% -Dlocal_build=true +set LAUNCHER_PLUGIN=org.eclipse.equinox.launcher_1.1.0.v20100507 +set BUILDER_PLUGIN=org.eclipse.pde.build_3.6.0.v20100603 +ant -DbuildDirectory=W:\git_build_dir\Pydev -Dbaseos=win32 -Dbasews=win32 -Dgit.executable=%GIT_EXECUTABLE% -Dbasearch=x86 -Ddeploy.dir=w:\git_deploy_dir\Pydev -DcleanAfter=false -Dvanilla.eclipse=D:\bin\eclipse_36_final_clean -DSTOREPASS=%STOREPASS% -DKEYSTORE=%KEYSTORE% -Dlocal_build=true -Dlauncher.plugin=%LAUNCHER_PLUGIN% -Dbuilder.plugin=%BUILDER_PLUGIN% Copy features and plugins folders from W:\git_deploy_dir\Pydev to W:\git_update_site_dir\updates diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/comon/parsing/DjTokenScanner.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/comon/parsing/DjTokenScanner.java index 00a6fe2b7..22289445f 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/comon/parsing/DjTokenScanner.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/comon/parsing/DjTokenScanner.java @@ -41,7 +41,6 @@ public List getDjRules() { private static final class DjStartDetector implements IWordDetector { - @Override public boolean isWordPart(char c) { switch (c) { case '{': @@ -51,7 +50,6 @@ public boolean isWordPart(char c) { return false; } - @Override public boolean isWordStart(char c) { return c == '{'; } @@ -59,7 +57,6 @@ public boolean isWordStart(char c) { private static final class DjEndDetector implements IWordDetector { - @Override public boolean isWordPart(char c) { switch (c) { case '%': @@ -69,7 +66,6 @@ public boolean isWordPart(char c) { return false; } - @Override public boolean isWordStart(char c) { return c == '}' || c == '%'; } diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/completions/DjContentAssistProcessor.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/completions/DjContentAssistProcessor.java index 9feaa272d..69932755f 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/completions/DjContentAssistProcessor.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/completions/DjContentAssistProcessor.java @@ -209,7 +209,6 @@ public IContextInformationValidator getContextInformationValidator() { return null; } - @Override public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset, char activationChar, boolean autoActivated) { ICompletionProposal[] proposals = null; if (this.htmlContentAssistProcessor != null) { diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssEditor.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssEditor.java index 6ab7770e7..9d9a13888 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssEditor.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssEditor.java @@ -68,7 +68,6 @@ protected void initializeEditor() { this.djEditor.registerPrefChangeListener(new ICallback() { - @Override public Object call(Object args) throws Exception { return getISourceViewer(); } diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLEditor.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLEditor.java index 37650d2fb..7385c1269 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLEditor.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLEditor.java @@ -67,7 +67,6 @@ protected void initializeEditor() { djEditor = new DjEditor(); this.djEditor.registerPrefChangeListener(new ICallback() { - @Override public Object call(Object args) throws Exception { return getISourceViewer(); } diff --git a/plugins/org.python.pydev/src/org/python/pydev/editor/preferences/PydevEditorPrefs.java b/plugins/org.python.pydev/src/org/python/pydev/editor/preferences/PydevEditorPrefs.java index 1b2549c5d..1dba7173d 100644 --- a/plugins/org.python.pydev/src/org/python/pydev/editor/preferences/PydevEditorPrefs.java +++ b/plugins/org.python.pydev/src/org/python/pydev/editor/preferences/PydevEditorPrefs.java @@ -323,7 +323,6 @@ public void dispose(){ public void setUpdateLabelExampleOnPrefsChanges() { updateLabelExampleOnPrefsChanges = new IPropertyChangeListener() { - @Override public void propertyChange(PropertyChangeEvent event) { updateLabelExample(PyFormatStd.getFormat(), PydevPrefs.getChainedPrefStore()); } diff --git a/plugins/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/PyCalltipsContextInformationFromIToken.java b/plugins/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/PyCalltipsContextInformationFromIToken.java index 92b1c1246..73288cc84 100644 --- a/plugins/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/PyCalltipsContextInformationFromIToken.java +++ b/plugins/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/PyCalltipsContextInformationFromIToken.java @@ -86,7 +86,6 @@ private void calculateArgumentsWithParens() { if(functionDef.args != null){ String printed = PrettyPrinterV2.printArguments(new IGrammarVersionProvider() { - @Override public int getGrammarVersion() throws MisconfigurationException { return IGrammarVersionProvider.GRAMMAR_PYTHON_VERSION_3_0; } From 6b5debb06aad43608cfc6f7b872342afec799745 Mon Sep 17 00:00:00 2001 From: fabioz Date: Tue, 28 Sep 2010 09:35:57 -0300 Subject: [PATCH 3/9] Updating license info. --- .../pydev/django_templates/IDjConstants.java | 37 +-- .../css/editor/DjCssDocumentProvider.java | 38 +-- .../css/editor/DjCssEditor.java | 38 +-- .../DjCssSourceViewerConfiguration.java | 38 +-- .../editor/DjPartitionerSwitchStrategy.java | 37 +-- .../html/editor/DjHTMLDocumentProvider.java | 37 +-- .../html/editor/DjHTMLEditor.java | 37 +-- .../DjHTMLSourceViewerConfiguration.java | 37 +-- .../LICENSE_JYTHON.txt | 77 ++++++ .../org.python.pydev.jython/LICENSE_PYHON.txt | 232 ++++++++++++++++++ .../org.python.pydev.jython/build.properties | 4 +- 11 files changed, 354 insertions(+), 258 deletions(-) create mode 100644 plugins/org.python.pydev.jython/LICENSE_JYTHON.txt create mode 100644 plugins/org.python.pydev.jython/LICENSE_PYHON.txt diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/IDjConstants.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/IDjConstants.java index 7e25480c4..689fd7960 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/IDjConstants.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/IDjConstants.java @@ -1,36 +1,9 @@ /** - * This file Copyright (c) 2005-2010 Aptana, Inc. This program is - * dual-licensed under both the Aptana Public License and the GNU General - * Public license. You may elect to use one or the other of these licenses. - * - * This program is distributed in the hope that it will be useful, but - * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or - * NONINFRINGEMENT. Redistribution, except as permitted by whichever of - * the GPL or APL you select, is prohibited. - * - * 1. For the GPL license (GPL), you can redistribute and/or modify this - * program under the terms of the GNU General Public License, - * Version 3, as published by the Free Software Foundation. You should - * have received a copy of the GNU General Public License, Version 3 along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Aptana provides a special exception to allow redistribution of this file - * with certain other free and open source software ("FOSS") code and certain additional terms - * pursuant to Section 7 of the GPL. You may view the exception and these - * terms on the web at http://www.aptana.com/legal/gpl/. - * - * 2. For the Aptana Public License (APL), this program and the - * accompanying materials are made available under the terms of the APL - * v1.0 which accompanies this distribution, and is available at - * http://www.aptana.com/legal/apl/. - * - * You may view the GPL, Aptana's exception and additional terms, and the - * APL in the file titled license.html at the root of the corresponding - * plugin containing this source file. - * - * Any modifications to this file must keep this entire header intact. + * Copyright (c) 2010 Aptana, Inc. + * 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 */ package org.python.pydev.django_templates; diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssDocumentProvider.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssDocumentProvider.java index ccd337f8c..82cf78316 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssDocumentProvider.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssDocumentProvider.java @@ -1,42 +1,14 @@ /** - * This file Copyright (c) 2005-2010 Aptana, Inc. This program is - * dual-licensed under both the Aptana Public License and the GNU General - * Public license. You may elect to use one or the other of these licenses. - * - * This program is distributed in the hope that it will be useful, but - * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or - * NONINFRINGEMENT. Redistribution, except as permitted by whichever of - * the GPL or APL you select, is prohibited. - * - * 1. For the GPL license (GPL), you can redistribute and/or modify this - * program under the terms of the GNU General Public License, - * Version 3, as published by the Free Software Foundation. You should - * have received a copy of the GNU General Public License, Version 3 along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Aptana provides a special exception to allow redistribution of this file - * with certain other free and open source software ("FOSS") code and certain additional terms - * pursuant to Section 7 of the GPL. You may view the exception and these - * terms on the web at http://www.aptana.com/legal/gpl/. - * - * 2. For the Aptana Public License (APL), this program and the - * accompanying materials are made available under the terms of the APL - * v1.0 which accompanies this distribution, and is available at - * http://www.aptana.com/legal/apl/. - * - * You may view the GPL, Aptana's exception and additional terms, and the - * APL in the file titled license.html at the root of the corresponding - * plugin containing this source file. - * - * Any modifications to this file must keep this entire header intact. + * Copyright (c) 2010 Aptana, Inc. + * 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 */ package org.python.pydev.django_templates.css.editor; import org.python.pydev.django_templates.IDjConstants; -import org.python.pydev.django_templates.editor.DjSourceConfiguration; import org.python.pydev.django_templates.editor.DjPartitionerSwitchStrategy; import com.aptana.editor.common.CompositeDocumentProvider; diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssEditor.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssEditor.java index 9d9a13888..052956b0e 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssEditor.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssEditor.java @@ -1,38 +1,12 @@ /** - * This file Copyright (c) 2005-2010 Aptana, Inc. This program is - * dual-licensed under both the Aptana Public License and the GNU General - * Public license. You may elect to use one or the other of these licenses. - * - * This program is distributed in the hope that it will be useful, but - * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or - * NONINFRINGEMENT. Redistribution, except as permitted by whichever of - * the GPL or APL you select, is prohibited. - * - * 1. For the GPL license (GPL), you can redistribute and/or modify this - * program under the terms of the GNU General Public License, - * Version 3, as published by the Free Software Foundation. You should - * have received a copy of the GNU General Public License, Version 3 along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Aptana provides a special exception to allow redistribution of this file - * with certain other free and open source software ("FOSS") code and certain additional terms - * pursuant to Section 7 of the GPL. You may view the exception and these - * terms on the web at http://www.aptana.com/legal/gpl/. - * - * 2. For the Aptana Public License (APL), this program and the - * accompanying materials are made available under the terms of the APL - * v1.0 which accompanies this distribution, and is available at - * http://www.aptana.com/legal/apl/. - * - * You may view the GPL, Aptana's exception and additional terms, and the - * APL in the file titled license.html at the root of the corresponding - * plugin containing this source file. - * - * Any modifications to this file must keep this entire header intact. + * Copyright (c) 2010 Aptana, Inc. + * 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 */ + package org.python.pydev.django_templates.css.editor; import org.eclipse.jface.text.source.ISourceViewer; diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssSourceViewerConfiguration.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssSourceViewerConfiguration.java index ed7e27e95..b3f861925 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssSourceViewerConfiguration.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/css/editor/DjCssSourceViewerConfiguration.java @@ -1,38 +1,12 @@ /** - * This file Copyright (c) 2005-2010 Aptana, Inc. This program is - * dual-licensed under both the Aptana Public License and the GNU General - * Public license. You may elect to use one or the other of these licenses. - * - * This program is distributed in the hope that it will be useful, but - * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or - * NONINFRINGEMENT. Redistribution, except as permitted by whichever of - * the GPL or APL you select, is prohibited. - * - * 1. For the GPL license (GPL), you can redistribute and/or modify this - * program under the terms of the GNU General Public License, - * Version 3, as published by the Free Software Foundation. You should - * have received a copy of the GNU General Public License, Version 3 along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Aptana provides a special exception to allow redistribution of this file - * with certain other free and open source software ("FOSS") code and certain additional terms - * pursuant to Section 7 of the GPL. You may view the exception and these - * terms on the web at http://www.aptana.com/legal/gpl/. - * - * 2. For the Aptana Public License (APL), this program and the - * accompanying materials are made available under the terms of the APL - * v1.0 which accompanies this distribution, and is available at - * http://www.aptana.com/legal/apl/. - * - * You may view the GPL, Aptana's exception and additional terms, and the - * APL in the file titled license.html at the root of the corresponding - * plugin containing this source file. - * - * Any modifications to this file must keep this entire header intact. + * Copyright (c) 2010 Aptana, Inc. + * 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 */ + package org.python.pydev.django_templates.css.editor; import java.util.HashMap; diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/editor/DjPartitionerSwitchStrategy.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/editor/DjPartitionerSwitchStrategy.java index 1773f525e..19660f33f 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/editor/DjPartitionerSwitchStrategy.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/editor/DjPartitionerSwitchStrategy.java @@ -1,36 +1,9 @@ /** - * This file Copyright (c) 2005-2010 Aptana, Inc. This program is - * dual-licensed under both the Aptana Public License and the GNU General - * Public license. You may elect to use one or the other of these licenses. - * - * This program is distributed in the hope that it will be useful, but - * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or - * NONINFRINGEMENT. Redistribution, except as permitted by whichever of - * the GPL or APL you select, is prohibited. - * - * 1. For the GPL license (GPL), you can redistribute and/or modify this - * program under the terms of the GNU General Public License, - * Version 3, as published by the Free Software Foundation. You should - * have received a copy of the GNU General Public License, Version 3 along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Aptana provides a special exception to allow redistribution of this file - * with certain other free and open source software ("FOSS") code and certain additional terms - * pursuant to Section 7 of the GPL. You may view the exception and these - * terms on the web at http://www.aptana.com/legal/gpl/. - * - * 2. For the Aptana Public License (APL), this program and the - * accompanying materials are made available under the terms of the APL - * v1.0 which accompanies this distribution, and is available at - * http://www.aptana.com/legal/apl/. - * - * You may view the GPL, Aptana's exception and additional terms, and the - * APL in the file titled license.html at the root of the corresponding - * plugin containing this source file. - * - * Any modifications to this file must keep this entire header intact. + * Copyright (c) 2010 Aptana, Inc. + * 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 */ package org.python.pydev.django_templates.editor; diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLDocumentProvider.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLDocumentProvider.java index 3778ea409..b437cbace 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLDocumentProvider.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLDocumentProvider.java @@ -1,36 +1,9 @@ /** - * This file Copyright (c) 2005-2010 Aptana, Inc. This program is - * dual-licensed under both the Aptana Public License and the GNU General - * Public license. You may elect to use one or the other of these licenses. - * - * This program is distributed in the hope that it will be useful, but - * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or - * NONINFRINGEMENT. Redistribution, except as permitted by whichever of - * the GPL or APL you select, is prohibited. - * - * 1. For the GPL license (GPL), you can redistribute and/or modify this - * program under the terms of the GNU General Public License, - * Version 3, as published by the Free Software Foundation. You should - * have received a copy of the GNU General Public License, Version 3 along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Aptana provides a special exception to allow redistribution of this file - * with certain other free and open source software ("FOSS") code and certain additional terms - * pursuant to Section 7 of the GPL. You may view the exception and these - * terms on the web at http://www.aptana.com/legal/gpl/. - * - * 2. For the Aptana Public License (APL), this program and the - * accompanying materials are made available under the terms of the APL - * v1.0 which accompanies this distribution, and is available at - * http://www.aptana.com/legal/apl/. - * - * You may view the GPL, Aptana's exception and additional terms, and the - * APL in the file titled license.html at the root of the corresponding - * plugin containing this source file. - * - * Any modifications to this file must keep this entire header intact. + * Copyright (c) 2010 Aptana, Inc. + * 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 */ package org.python.pydev.django_templates.html.editor; diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLEditor.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLEditor.java index 7385c1269..19321a660 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLEditor.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLEditor.java @@ -1,36 +1,9 @@ /** - * This file Copyright (c) 2005-2010 Aptana, Inc. This program is - * dual-licensed under both the Aptana Public License and the GNU General - * Public license. You may elect to use one or the other of these licenses. - * - * This program is distributed in the hope that it will be useful, but - * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or - * NONINFRINGEMENT. Redistribution, except as permitted by whichever of - * the GPL or APL you select, is prohibited. - * - * 1. For the GPL license (GPL), you can redistribute and/or modify this - * program under the terms of the GNU General Public License, - * Version 3, as published by the Free Software Foundation. You should - * have received a copy of the GNU General Public License, Version 3 along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Aptana provides a special exception to allow redistribution of this file - * with certain other free and open source software ("FOSS") code and certain additional terms - * pursuant to Section 7 of the GPL. You may view the exception and these - * terms on the web at http://www.aptana.com/legal/gpl/. - * - * 2. For the Aptana Public License (APL), this program and the - * accompanying materials are made available under the terms of the APL - * v1.0 which accompanies this distribution, and is available at - * http://www.aptana.com/legal/apl/. - * - * You may view the GPL, Aptana's exception and additional terms, and the - * APL in the file titled license.html at the root of the corresponding - * plugin containing this source file. - * - * Any modifications to this file must keep this entire header intact. + * Copyright (c) 2010 Aptana, Inc. + * 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 */ package org.python.pydev.django_templates.html.editor; diff --git a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLSourceViewerConfiguration.java b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLSourceViewerConfiguration.java index 4428d27bf..7dc5ed7bb 100644 --- a/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLSourceViewerConfiguration.java +++ b/plugins/org.python.pydev.django_templates/src/org/python/pydev/django_templates/html/editor/DjHTMLSourceViewerConfiguration.java @@ -1,36 +1,9 @@ /** - * This file Copyright (c) 2005-2010 Aptana, Inc. This program is - * dual-licensed under both the Aptana Public License and the GNU General - * Public license. You may elect to use one or the other of these licenses. - * - * This program is distributed in the hope that it will be useful, but - * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or - * NONINFRINGEMENT. Redistribution, except as permitted by whichever of - * the GPL or APL you select, is prohibited. - * - * 1. For the GPL license (GPL), you can redistribute and/or modify this - * program under the terms of the GNU General Public License, - * Version 3, as published by the Free Software Foundation. You should - * have received a copy of the GNU General Public License, Version 3 along - * with this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Aptana provides a special exception to allow redistribution of this file - * with certain other free and open source software ("FOSS") code and certain additional terms - * pursuant to Section 7 of the GPL. You may view the exception and these - * terms on the web at http://www.aptana.com/legal/gpl/. - * - * 2. For the Aptana Public License (APL), this program and the - * accompanying materials are made available under the terms of the APL - * v1.0 which accompanies this distribution, and is available at - * http://www.aptana.com/legal/apl/. - * - * You may view the GPL, Aptana's exception and additional terms, and the - * APL in the file titled license.html at the root of the corresponding - * plugin containing this source file. - * - * Any modifications to this file must keep this entire header intact. + * Copyright (c) 2010 Aptana, Inc. + * 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 */ package org.python.pydev.django_templates.html.editor; diff --git a/plugins/org.python.pydev.jython/LICENSE_JYTHON.txt b/plugins/org.python.pydev.jython/LICENSE_JYTHON.txt new file mode 100644 index 000000000..55d9bffe6 --- /dev/null +++ b/plugins/org.python.pydev.jython/LICENSE_JYTHON.txt @@ -0,0 +1,77 @@ +The Jython License +A. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING JYTHON +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 + +1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Jython") in source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Jython alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2007 Python Software Foundation; All Rights Reserved" are retained in Jython alone or in any derivative version prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on or incorporates Jython or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Jython. + +4. PSF is making Jython available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF JYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF JYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING JYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Jython, Licensee agrees to be bound by the terms and conditions of this License Agreement. +Jython 2.0, 2.1 License + +Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Jython Developers All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the Jython Developers nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +JPython 1.1.x Software License. + + 1. + + This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and using JPython version 1.1.x in source or binary form and its associated documentation as provided herein ("Software"). + 2. + + Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a non-exclusive, non-transferable, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright ©1996-1999 Corporation for National Research Initiatives; All Rights Reserved" are both retained in the Software, alone or in any derivative version prepared by Licensee. + + Alternatively, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes), provided, however, that such text is displayed prominently in the Software alone or in any derivative version prepared by Licensee: "JPython (Version 1.1.x) is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1006. The License may also be obtained from a proxy server on the Web using the following URL: http://hdl.handle.net/1895.22/1006." + 3. + + In the event Licensee prepares a derivative work that is based on or incorporates the Software or any part thereof, and wants to make the derivative work available to the public as provided herein, then Licensee hereby agrees to indicate in any such work, in a prominently visible way, the nature of the modifications made to CNRI's Software. + 4. + + Licensee may not use CNRI trademarks or trade name, including JPython or CNRI, in a trademark sense to endorse or promote products or services of Licensee, or any third party. Licensee may use the mark JPython in connection with Licensee's derivative versions that are based on or incorporate the Software, but only in the form "JPython-based ___________________," or equivalent. + 5. + + CNRI is making the Software available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. + 6. + + CNRI SHALL NOT BE LIABLE TO LICENSEE OR OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. SOME STATES DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY SO THE ABOVE DISCLAIMER MAY NOT APPLY TO LICENSEE. + 7. + + This License Agreement may be terminated by CNRI (i) immediately upon written notice from CNRI of any material breach by the Licensee, if the nature of the breach is such that it cannot be promptly remedied; or (ii) sixty (60) days following notice from CNRI to Licensee of a material remediable breach, if Licensee has not remedied such breach within that sixty-day period. + 8. + + This License Agreement shall be governed by and interpreted in all respects by the law of the State of Virginia, excluding conflict of law provisions. Nothing in this Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. + 9. + + By clicking on the "ACCEPT" button where indicated, or by installing, copying or otherwise using the Software, Licensee agrees to be bound by the terms and conditions of this License Agreement. + + [ACCEPT BUTTON] + +B. HISTORY OF THE SOFTWARE + +JPython was created in late 1997 by Jim Hugunin. Jim was also the primary developer while he was at CNRI. In February 1999 Barry Warsaw took over as primary developer and released JPython version 1.1. + +In October 2000 Barry helped move the software to SourceForge where it was renamed to Jython. Jython 2.0 and 2.1 were developed under the Jython specific license below. + +From the 2.2 release on, Jython contributors have signed Python Software Foundation contributor agreements and releases are covered under the Python Software Foundation license version 2. + +The standard library is covered by the Python Software Foundation license as well. See the Lib/LICENSE file for details. + +The zxJDBC package was written by Brian Zimmer and originally licensed under the GNU Public License. The package is now covered by the Jython Software License. + +The command line interpreter is covered by the Apache Software License. See the org/apache/LICENSE file for details. diff --git a/plugins/org.python.pydev.jython/LICENSE_PYHON.txt b/plugins/org.python.pydev.jython/LICENSE_PYHON.txt new file mode 100644 index 000000000..04a048468 --- /dev/null +++ b/plugins/org.python.pydev.jython/LICENSE_PYHON.txt @@ -0,0 +1,232 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI) in the Netherlands as a successor of a +language called ABC. Guido is Python's principal author, although it +includes many contributions from others. The last version released +from CWI was Python 1.2. In 1995, Guido continued his work on Python +at the Corporation for National Research Initiatives (CNRI) in Reston, +Virginia where he released several versions of the software. Python +1.6 was the last of the versions released by CNRI. In 2000, Guido and +the Python core development team moved to BeOpen.com to form the +BeOpen PythonLabs team. Python 2.0 was the first and only release +from BeOpen.com. + +Following the release of Python 1.6, and after Guido van Rossum left +CNRI to work with commercial software developers, it became clear that +the ability to use Python with software available under the GNU Public +License (GPL) was very desirable. CNRI and the Free Software +Foundation (FSF) interacted to develop enabling wording changes to the +Python license. Python 1.6.1 is essentially the same as Python 1.6, +with a few minor bug fixes, and with a different license that enables +later versions to be GPL-compatible. Python 2.1 is a derivative work +of Python 1.6.1, as well as of Python 2.0. + +After Python 2.0 was released by BeOpen.com, Guido van Rossum and the +other PythonLabs developers joined Digital Creations. All +intellectual property added from this point on, starting with Python +2.1 and its alpha and beta releases, is owned by the Python Software +Foundation (PSF), a non-profit modeled after the Apache Software +Foundation. See http://www.python.org/psf/ for more information about +the PSF. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PSF LICENSE AGREEMENT +--------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using Python 2.1.1 software in source or binary form and its +associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 2.1.1 +alone or in any derivative version, provided, however, that PSF's +License Agreement and PSF's notice of copyright, i.e., "Copyright (c) +2001 Python Software Foundation; All Rights Reserved" are retained in +Python 2.1.1 alone or in any derivative version prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 2.1.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 2.1.1. + +4. PSF is making Python 2.1.1 available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.1.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +2.1.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.1.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python 2.1.1, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0 +---------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI OPEN SOURCE GPL-COMPATIBLE LICENSE AGREEMENT +------------------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI PERMISSIONS STATEMENT AND DISCLAIMER +---------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/plugins/org.python.pydev.jython/build.properties b/plugins/org.python.pydev.jython/build.properties index f2ef7e163..b95200749 100644 --- a/plugins/org.python.pydev.jython/build.properties +++ b/plugins/org.python.pydev.jython/build.properties @@ -5,7 +5,9 @@ bin.includes = META-INF/,\ plugin.xml,\ Lib/,\ LICENSE.txt,\ - jython.jar + jython.jar,\ + LICENSE_JYTHON.txt,\ + plugin.properties jars.compile.order = pydev-jython.jar source.pydev-jython.jar = src/ output.pydev-jython.jar = bin/ From 6e505dfc5ae048b6580005c55cd07f34450c8cd8 Mon Sep 17 00:00:00 2001 From: fabioz Date: Tue, 28 Sep 2010 10:13:46 -0300 Subject: [PATCH 4/9] Fixed issue with 'clean' build. --- .../src/org/python/pydev/builder/PyDevBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/org.python.pydev/src/org/python/pydev/builder/PyDevBuilder.java b/plugins/org.python.pydev/src/org/python/pydev/builder/PyDevBuilder.java index 7c7fe7c30..debc22f95 100644 --- a/plugins/org.python.pydev/src/org/python/pydev/builder/PyDevBuilder.java +++ b/plugins/org.python.pydev/src/org/python/pydev/builder/PyDevBuilder.java @@ -75,7 +75,7 @@ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws if (PyDevBuilderPrefPage.usePydevBuilders() == false) return null; - if (kind == IncrementalProjectBuilder.FULL_BUILD) { + if (kind == IncrementalProjectBuilder.FULL_BUILD || kind == IncrementalProjectBuilder.CLEAN_BUILD) { // Do a Full Build: Use a ResourceVisitor to process the tree. performFullBuild(monitor); From f5b1117cdb7cc6d8ee5c7aeced90097284b9d6bb Mon Sep 17 00:00:00 2001 From: fabioz Date: Tue, 28 Sep 2010 10:49:02 -0300 Subject: [PATCH 5/9] Fixed path issues in sqlite3 path in django project creation. --- .../wizards/project/DjangoSettingsPage.java | 69 ++++++++++++------- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoSettingsPage.java b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoSettingsPage.java index d22a23c29..d552be1d2 100644 --- a/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoSettingsPage.java +++ b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoSettingsPage.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; +import org.eclipse.core.runtime.IPath; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -27,23 +28,23 @@ public class DjangoSettingsPage extends WizardPage { public static final String JYTHON = "jython"; static final ArrayList DJANGO_VERSIONS = new ArrayList() {{ + add("1.2 or later"); + add("1.1"); + add("1.0"); add("pre-1.0"); - add("1.0"); - add("1.1"); - add("1.2 or later"); }}; static final Map> DB_ENGINES = new HashMap>() {{ put(CPYTHON, new ArrayList() {{ + add("sqlite3"); add("postgresql_psycopg2"); - add("sqlite3"); add("mysql"); add("oracle"); add("other (just type in combo)"); }}); put(JYTHON, new ArrayList() {{ + add("doj.backends.zxjdbc.sqlite3"); add("doj.backends.zxjdbc.postgresql"); - add("doj.backends.zxjdbc.sqlite3"); add("doj.backends.zxjdbc.mysql"); add("doj.backends.zxjdbc.oracle"); add("other (just type in combo)"); @@ -61,6 +62,7 @@ public class DjangoSettingsPage extends WizardPage { private Text userText; private Text passText; private ICallback0 projectPageCallback; + private String previousProjectType = ""; public DjangoSettingsPage(String pageName, ICallback0 projectPage) { super(pageName); @@ -90,23 +92,31 @@ public void setPreviousPage(IWizardPage page) { super.setPreviousPage(page); final IWizardNewProjectNameAndLocationPage projectPage = projectPageCallback.call(); - djVersionCombo.removeAll(); - for (String version : DJANGO_VERSIONS) { - djVersionCombo.add(version); - } + if(djVersionCombo.getItemCount() == 0){ + //fill it only if it's still not properly filled + djVersionCombo.removeAll(); + for (String version : DJANGO_VERSIONS) { + djVersionCombo.add(version); + } - djVersionCombo.setText(DJANGO_VERSIONS.get(0)); + djVersionCombo.setText(DJANGO_VERSIONS.get(0)); + } String projectType = projectPage.getProjectType(); - List engines = DB_ENGINES.get( - projectType.startsWith("jython") ? DjangoSettingsPage.JYTHON : DjangoSettingsPage.CPYTHON); - engineCombo.removeAll(); - for (String engine : engines) { - engineCombo.add(engine); + if(!projectType.equals(previousProjectType)){ + previousProjectType = projectType; + List engines = DB_ENGINES.get( + projectType.startsWith("jython") ? DjangoSettingsPage.JYTHON : DjangoSettingsPage.CPYTHON); + engineCombo.removeAll(); + for (String engine : engines) { + engineCombo.add(engine); + } + + engineCombo.setText(engines.get(0)); } - - engineCombo.setText(engines.get(0)); - + + //Always update the sqlite path if needed. + updateSqlitePathIfNeeded(projectPage); } public void createControl(Composite parent) { @@ -156,14 +166,10 @@ public void createControl(Composite parent) { engineCombo.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { - String selection = engineCombo.getText(); - if(selection.endsWith("sqlite3")){ - String projectName = projectPage.getProjectName(); - nameText.setText(projectPage.getLocationPath().append(projectName).append("sqlite.db").toOSString()); - } + updateSqlitePathIfNeeded(projectPage); } - - + + public void widgetDefaultSelected(SelectionEvent e) { } }); @@ -217,6 +223,19 @@ public DjangoSettings getSettings() { return s; } + public void updateSqlitePathIfNeeded(final IWizardNewProjectNameAndLocationPage projectPage) { + String selection = engineCombo.getText(); + if(selection.endsWith("sqlite3")){ + String projectName = projectPage.getProjectName(); + boolean shouldCreatSourceFolder = projectPage.shouldCreatSourceFolder(); + IPath base = projectPage.getLocationPath().append(projectName); + if(shouldCreatSourceFolder){ + base = base.append("src"); + } + nameText.setText(base.append("sqlite.db").toOSString()); + } + } + private String escapeSlashes(String text) { return StringUtils.replaceAll(text, "\\", "\\\\\\\\"); From cd2c8dbd03462c9c90fa04c0733b8c07d09a6f61 Mon Sep 17 00:00:00 2001 From: fabioz Date: Tue, 28 Sep 2010 11:18:21 -0300 Subject: [PATCH 6/9] If a debug session is terminated, no message saying that the variable can't be resolved in the hover is shown if the debug target is still selected. --- .../src/org/python/pydev/debug/ui/hover/PyDebugHover.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/hover/PyDebugHover.java b/plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/hover/PyDebugHover.java index 2fbd0a8b9..aa058485c 100644 --- a/plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/hover/PyDebugHover.java +++ b/plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/hover/PyDebugHover.java @@ -4,6 +4,7 @@ import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.model.IDebugElement; +import org.eclipse.debug.core.model.IDebugTarget; import org.eclipse.debug.core.model.IValue; import org.eclipse.debug.core.model.IWatchExpression; import org.eclipse.debug.ui.DebugUITools; @@ -42,6 +43,10 @@ public String getHoverText(IRegion hoverRegion, PySourceViewer s, PySelection ps } if(context != null){ + IDebugTarget debugTarget = context.getDebugTarget(); + if(debugTarget == null || debugTarget.isTerminated()){ + return null; + } String act = null; ITextSelection textSelection = (ITextSelection) selection; int mouseOffset = ps.getAbsoluteCursorOffset(); From 40d9f1ba371ce7237c495593b5e0adc7815f39cf Mon Sep 17 00:00:00 2001 From: fabioz Date: Tue, 28 Sep 2010 12:24:43 -0300 Subject: [PATCH 7/9] 2to3 only added in the context menu of projects with the pydev nature / changed the 2to3 dialog font to a monospaced font. --- plugins/org.python.pydev/plugin.xml | 1 + .../pydev/ui/actions/resources/Py2To3.java | 48 ++++++++++++++++--- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/plugins/org.python.pydev/plugin.xml b/plugins/org.python.pydev/plugin.xml index dc27786d4..a95896ddb 100644 --- a/plugins/org.python.pydev/plugin.xml +++ b/plugins/org.python.pydev/plugin.xml @@ -154,6 +154,7 @@ menubarPath="org.python.pydev.ui.actions.menu/pydev" tooltip="Apply 2To3 (lib2to3 must be available in the interpreter PYTHONPATH)"> + diff --git a/plugins/org.python.pydev/src/org/python/pydev/ui/actions/resources/Py2To3.java b/plugins/org.python.pydev/src/org/python/pydev/ui/actions/resources/Py2To3.java index 469db38ca..13181febf 100644 --- a/plugins/org.python.pydev/src/org/python/pydev/ui/actions/resources/Py2To3.java +++ b/plugins/org.python.pydev/src/org/python/pydev/ui/actions/resources/Py2To3.java @@ -12,8 +12,14 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.dialogs.InputDialog; import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.FontMetrics; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.console.IOConsoleOutputStream; @@ -98,6 +104,12 @@ protected boolean confirmRun() { msg += "\n"; msg += tup.o2; } + final List splitInLines = StringUtils.splitInLines(msg); + int max = 10; + for (String string : splitInLines) { + max = Math.max(string.length(), max); + } + final int maxChars = max; InputDialog d = new InputDialog( PyAction.getShell(), @@ -105,15 +117,39 @@ protected boolean confirmRun() { msg, "", null){ + int averageCharWidth; + int height; protected Control createDialogArea(Composite parent) { -// try { -// FontData labelFontData = new FontData("Courier New", 8, SWT.NONE); -// parent.setFont(new Font(parent.getDisplay(), labelFontData)); -// } catch (Throwable e) { -// //ignore -// } + + try { + FontData labelFontData = new FontData("Courier New", 8, SWT.NONE); + Display display = parent.getDisplay(); + Font font = new Font(display, labelFontData); + parent.setFont(font); + + GC gc = new GC(display); + gc.setFont(font); + FontMetrics fontMetrics = gc.getFontMetrics(); + averageCharWidth = fontMetrics.getAverageCharWidth(); + height = fontMetrics.getHeight(); + gc.dispose(); + } catch (Throwable e) { + //ignore + } return super.createDialogArea(parent); } + + protected Point getInitialSize() { + Point result = super.getInitialSize(); + //Check if we were able to get proper values before changing it. + if(averageCharWidth > 0 && maxChars > 0){ + result.x = (int)(averageCharWidth * maxChars * 1.15); + } + if(height > 0 && splitInLines.size() > 0){ + result.y = height * (splitInLines.size() + 6); //put some lines extra (we need the input line too) + } + return result; + } }; From 248832549f15f870ebd7f3d8776b857946ad91a6 Mon Sep 17 00:00:00 2001 From: fabioz Date: Tue, 28 Sep 2010 20:14:11 -0300 Subject: [PATCH 8/9] The example code in the pydev editor preferences is no longer editable. --- .../python/pydev/editor/StyledTextForShowingCodeFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/org.python.pydev/src/org/python/pydev/editor/StyledTextForShowingCodeFactory.java b/plugins/org.python.pydev/src/org/python/pydev/editor/StyledTextForShowingCodeFactory.java index a7d210d7c..a69aa5f4e 100644 --- a/plugins/org.python.pydev/src/org/python/pydev/editor/StyledTextForShowingCodeFactory.java +++ b/plugins/org.python.pydev/src/org/python/pydev/editor/StyledTextForShowingCodeFactory.java @@ -59,7 +59,7 @@ public class StyledTextForShowingCodeFactory implements IPropertyChangeListener{ * @return a styled text that can be used to show code with the colors based on the color cache received. */ public StyledText createStyledTextForCodePresentation(Composite parent){ - styledText = new StyledText(parent, SWT.BORDER); + styledText = new StyledText(parent, SWT.BORDER|SWT.READ_ONLY); this.backgroundColorCache = new ColorAndStyleCache(new PreferenceStore()); this.colorCache = new ColorAndStyleCache(null); try { From 1274970bb5d03f97ee00962d877d71b26f0d8596 Mon Sep 17 00:00:00 2001 From: fabioz Date: Tue, 28 Sep 2010 21:42:17 -0300 Subject: [PATCH 9/9] Improved django wizard configuration a bit to cover cases where the user does not have django installed or tries to add 'django' as the project name --- .../wizards/project/DjangoNewProjectPage.java | 64 +++++++++++++++++++ .../project/DjangoNotAvailableWizardPage.java | 55 ++++++++++++++++ .../wizards/project/DjangoProjectWizard.java | 7 ++ .../ui/wizards/project/ErrorWizardPage.java | 34 ++++++++++ .../NewProjectNameAndLocationWizardPage.java | 2 +- 5 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoNotAvailableWizardPage.java create mode 100644 plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/ErrorWizardPage.java diff --git a/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoNewProjectPage.java b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoNewProjectPage.java index 3c2d64895..a8a55d07f 100644 --- a/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoNewProjectPage.java +++ b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoNewProjectPage.java @@ -1,6 +1,14 @@ package org.python.pydev.django.ui.wizards.project; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.swt.widgets.Composite; +import org.python.pydev.core.IInterpreterInfo; +import org.python.pydev.core.IInterpreterManager; +import org.python.pydev.core.IModule; +import org.python.pydev.core.IPythonNature; +import org.python.pydev.core.MisconfigurationException; +import org.python.pydev.plugin.PydevPlugin; import org.python.pydev.ui.wizards.project.NewProjectNameAndLocationWizardPage; public class DjangoNewProjectPage extends NewProjectNameAndLocationWizardPage { @@ -22,4 +30,60 @@ public DjangoNewProjectPage(String pageName) { public void createControl(Composite parent) { super.createControl(parent); } + + @Override + public IWizardPage getNextPage() { + String projectType = this.getProjectType(); + + IInterpreterManager interpreterManager; + if(IPythonNature.Versions.ALL_JYTHON_VERSIONS.contains(projectType)){ + interpreterManager = PydevPlugin.getJythonInterpreterManager(); + + }else if(IPythonNature.Versions.ALL_IRONPYTHON_VERSIONS.contains(projectType)){ + interpreterManager = PydevPlugin.getIronpythonInterpreterManager(); + + }else{ + //if others fail, consider it python + interpreterManager = PydevPlugin.getPythonInterpreterManager(); + } + + try { + String projectInterpreter = this.getProjectInterpreter(); + IInterpreterInfo interpreterInfo; + if(projectInterpreter.toLowerCase().equals("default")){ + interpreterInfo = interpreterManager.getDefaultInterpreterInfo(new NullProgressMonitor()); + }else{ + interpreterInfo = interpreterManager.getInterpreterInfo(projectInterpreter, new NullProgressMonitor()); + } + IModule module = interpreterInfo.getModulesManager().getModuleWithoutBuiltins("django.core.__init__", null, false); + if(module == null){ + DjangoNotAvailableWizardPage page = new DjangoNotAvailableWizardPage("Django not available", interpreterInfo); + page.setWizard(this.getWizard()); + return page; + } + } catch (MisconfigurationException e) { + ErrorWizardPage page = new ErrorWizardPage("Unexpected error.", "An unexpected error happened:\n"+e.getMessage()); + page.setWizard(this.getWizard()); + return page; + } + + + return super.getNextPage(); + } + + @Override + protected boolean validatePage() { + boolean validated = super.validatePage(); + if(!validated){ + return false; //some error found in the base class + } + + String projectName = getProjectName(); + if (projectName.trim().toLowerCase().equals("django")) { //$NON-NLS-1$ + setErrorMessage("When creating a Django project it cannot be named Django because of conflicts with the default Django install."); + return false; + } + return true; + } + } diff --git a/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoNotAvailableWizardPage.java b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoNotAvailableWizardPage.java new file mode 100644 index 000000000..c306cc8d9 --- /dev/null +++ b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoNotAvailableWizardPage.java @@ -0,0 +1,55 @@ +package org.python.pydev.django.ui.wizards.project; + +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.program.Program; +import org.eclipse.swt.widgets.Composite; +import org.python.pydev.core.IInterpreterInfo; +import org.python.pydev.utils.LinkFieldEditor; + +public class DjangoNotAvailableWizardPage extends WizardPage{ + + + public DjangoNotAvailableWizardPage(String pageName, IInterpreterInfo interpreterInfo) { + super(pageName); + } + + + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NULL); + composite.setLayout(new GridLayout()); + composite.setLayoutData(new GridData(GridData.FILL_BOTH)); + composite.setFont(parent.getFont()); + + + LinkFieldEditor colorsAndFontsLinkFieldEditor = new LinkFieldEditor( + "UNUSED", "To get started with Django in Pydev, a pre-requisite is that Django is \n" + + "installed in the Python / Jython / IronPython interpreter you want to use \n" + + "(so, \"import django\" must properly work). \n" + + "\n" + + "It seems that the selected interpreter does not have Django available, so, please\n" + + "install Django, reconfigure the interpreter so that Django is recognized\n" + + "and then come back to this wizard.\n" + + "\n" + + "An introduction on how to get started with Django in Pydev is available at:\n" + + "http://pydev.org/manual_adv_django.html.\n" + , composite, new SelectionListener() { + + public void widgetSelected(SelectionEvent e) { + Program.launch("http://pydev.org/manual_adv_django.html"); + } + + public void widgetDefaultSelected(SelectionEvent e) { + } + }); + colorsAndFontsLinkFieldEditor.getLinkControl(composite); + + setErrorMessage("Django not found."); + setControl(composite); + } + +} diff --git a/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoProjectWizard.java b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoProjectWizard.java index c4eb48d90..e84d73f78 100644 --- a/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoProjectWizard.java +++ b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/DjangoProjectWizard.java @@ -20,6 +20,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.wizard.IWizardPage; import org.python.pydev.core.ICodeCompletionASTManager; import org.python.pydev.core.REF; import org.python.pydev.core.Tuple; @@ -279,4 +280,10 @@ protected void initializeDefaultPageImageDescriptor() { ImageDescriptor desc = PydevPlugin.imageDescriptorFromPlugin(DjangoPlugin.getPluginID(), "icons/django_logo.png");//$NON-NLS-1$ setDefaultPageImageDescriptor(desc); } + + @Override + public boolean canFinish() { + IWizardPage currentPage = this.getContainer().getCurrentPage(); + return currentPage == this.settingsPage; //can only finish at the last page! + } } diff --git a/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/ErrorWizardPage.java b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/ErrorWizardPage.java new file mode 100644 index 000000000..122d4a1d8 --- /dev/null +++ b/plugins/org.python.pydev.django/src/org/python/pydev/django/ui/wizards/project/ErrorWizardPage.java @@ -0,0 +1,34 @@ +package org.python.pydev.django.ui.wizards.project; + +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +public class ErrorWizardPage extends WizardPage{ + + private String msg; + + protected ErrorWizardPage(String pageName, String msg) { + super(pageName); + this.msg = msg; + } + + + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NULL); + composite.setLayout(new GridLayout()); + composite.setLayoutData(new GridData(GridData.FILL_BOTH)); + composite.setFont(parent.getFont()); + + Label label = new Label(composite, SWT.NONE); + label.setFont(parent.getFont()); + label.setText(msg); + + setErrorMessage("Unexpected error."); + setControl(composite); + } + +} diff --git a/plugins/org.python.pydev/src/org/python/pydev/ui/wizards/project/NewProjectNameAndLocationWizardPage.java b/plugins/org.python.pydev/src/org/python/pydev/ui/wizards/project/NewProjectNameAndLocationWizardPage.java index 2be627f06..f98941d0a 100644 --- a/plugins/org.python.pydev/src/org/python/pydev/ui/wizards/project/NewProjectNameAndLocationWizardPage.java +++ b/plugins/org.python.pydev/src/org/python/pydev/ui/wizards/project/NewProjectNameAndLocationWizardPage.java @@ -455,7 +455,7 @@ private void setLocationForSelection() { * @return true if all controls are valid, and * false if at least one is invalid */ - private boolean validatePage() { + protected boolean validatePage() { IWorkspace workspace = ResourcesPlugin.getWorkspace(); String projectFieldContents = getProjectNameFieldValue();