diff --git a/eclipse-pydev.spec b/eclipse-pydev.spec index facaf74..c8d3c4f 100644 --- a/eclipse-pydev.spec +++ b/eclipse-pydev.spec @@ -13,7 +13,7 @@ Epoch: 1 Summary: Eclipse Python development plug-in Name: eclipse-pydev Version: 4.5.5 -Release: 2%{?dist} +Release: 3%{?dist} License: EPL URL: http://pydev.org @@ -34,6 +34,8 @@ Patch4: fix-process-killing.patch Patch6: fix-winp-jar.patch +Patch7: neonify.patch + Requires: eclipse-platform Requires: python3 Requires: apache-commons-logging @@ -80,6 +82,7 @@ Mylyn Task-Focused UI extensions for Pydev. %patch3 %patch4 -p1 %patch6 -p1 +%patch7 -p1 %mvn_package "::pom:" __noinstall %mvn_package ":*.mylyn" mylyn @@ -222,6 +225,9 @@ fi %doc LICENSE.txt %changelog +* Mon Apr 25 2016 Sopot Cela 1:4.5.5-3 +- Patch so it builds with Neon + * Wed Apr 6 2016 Alexander Kurtakov 1:4.5.5-2 - Switch python* requires to python3. diff --git a/neonify.patch b/neonify.patch new file mode 100644 index 0000000..4cea565 --- /dev/null +++ b/neonify.patch @@ -0,0 +1,271 @@ +diff --git a/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/resource_stubs/WorkspaceStub.java b/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/resource_stubs/WorkspaceStub.java +index d3dd018..e0082da 100644 +--- a/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/resource_stubs/WorkspaceStub.java ++++ b/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/resource_stubs/WorkspaceStub.java +@@ -29,6 +29,7 @@ + import org.eclipse.core.resources.IWorkspaceRoot; + import org.eclipse.core.resources.IWorkspaceRunnable; + import org.eclipse.core.runtime.CoreException; ++import org.eclipse.core.runtime.ICoreRunnable; + import org.eclipse.core.runtime.IPath; + import org.eclipse.core.runtime.IProgressMonitor; + import org.eclipse.core.runtime.IStatus; +@@ -284,4 +285,11 @@ public void build(IBuildConfiguration[] buildConfigs, int kind, boolean buildRef + throws CoreException { + } + ++ public void run(ICoreRunnable action, ISchedulingRule rule, int flags, IProgressMonitor monitor) ++ throws CoreException { ++ } ++ ++ public void run(ICoreRunnable action, IProgressMonitor monitor) throws CoreException { ++ } ++ + } +diff --git a/plugins/org.python.pydev/src/org/python/pydev/editor/PyEditConfiguration.java b/plugins/org.python.pydev/src/org/python/pydev/editor/PyEditConfiguration.java +index 421173e..89c3085 100644 +--- a/plugins/org.python.pydev/src/org/python/pydev/editor/PyEditConfiguration.java ++++ b/plugins/org.python.pydev/src/org/python/pydev/editor/PyEditConfiguration.java +@@ -13,6 +13,7 @@ + + import java.util.Map; + ++import org.eclipse.core.runtime.IAdaptable; + import org.eclipse.jface.preference.IPreferenceStore; + import org.eclipse.jface.text.IDocument; + import org.eclipse.jface.text.ITextHover; +@@ -80,11 +81,9 @@ public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) { + * @since 3.3 + */ + @Override +- @SuppressWarnings("unchecked") +- protected Map getHyperlinkDetectorTargets( ++ protected Map getHyperlinkDetectorTargets( + ISourceViewer sourceViewer) { +- Map targets = super +- .getHyperlinkDetectorTargets(sourceViewer); ++ Map targets = super.getHyperlinkDetectorTargets(sourceViewer); + targets.put("org.python.pydev.editor.PythonEditor", edit); //$NON-NLS-1$ + return targets; + } +diff --git a/plugins/org.python.pydev/src/org/python/pydev/editor/PyReconciler.java b/plugins/org.python.pydev/src/org/python/pydev/editor/PyReconciler.java +index 1e60489..ec867ce 100644 +--- a/plugins/org.python.pydev/src/org/python/pydev/editor/PyReconciler.java ++++ b/plugins/org.python.pydev/src/org/python/pydev/editor/PyReconciler.java +@@ -56,7 +56,7 @@ + private IAnnotationModel fAnnotationModel; + + /** Annotations to add. */ +- private Map fAddAnnotations; ++ private Map fAddAnnotations; + + /** + * Initializes this collector with the given annotation model. +@@ -82,7 +82,7 @@ public void accept(SpellingProblem problem) { + */ + @Override + public void beginCollecting() { +- fAddAnnotations = new HashMap(); ++ fAddAnnotations = new HashMap(); + } + + /* +@@ -110,7 +110,7 @@ public void endCollecting() { + //retain that object locked (the annotation model is used on lots of places, so, retaining the lock + //on it on a minimum priority thread is not a good thing. + thread.setPriority(Thread.NORM_PRIORITY); +- Iterator iter; ++ Iterator iter; + + synchronized (fLockObject) { + iter = fAnnotationModel.getAnnotationIterator(); +diff --git a/plugins/org.python.pydev/src/org/python/pydev/editor/actions/codefolding/PyFoldingAction.java b/plugins/org.python.pydev/src/org/python/pydev/editor/actions/codefolding/PyFoldingAction.java +index 59fb7f7..51912da 100644 +--- a/plugins/org.python.pydev/src/org/python/pydev/editor/actions/codefolding/PyFoldingAction.java ++++ b/plugins/org.python.pydev/src/org/python/pydev/editor/actions/codefolding/PyFoldingAction.java +@@ -1,5 +1,5 @@ + /** +- * Copyright (c) 2005-2013 by Appcelerator, Inc. All Rights Reserved. ++ * Copyright (c) 2005-201 6by Appcelerator, Inc. All Rights Reserved. + * Licensed under the terms of the Eclipse Public License (EPL). + * Please see the license.txt included with this distribution for details. + * Any modifications to this file must keep this entire header intact. +@@ -16,6 +16,7 @@ + import java.util.List; + + import org.eclipse.jface.text.Position; ++import org.eclipse.jface.text.source.Annotation; + import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel; + import org.python.pydev.editor.actions.PyAction; + import org.python.pydev.editor.codefolding.PyProjectionAnnotation; +@@ -29,13 +30,14 @@ + * @param model + * @return + */ +- protected Iterator getAnnotationsIterator(final ProjectionAnnotationModel model, boolean useExpanded) { ++ protected Iterator getAnnotationsIterator(final ProjectionAnnotationModel model, ++ boolean useExpanded) { + //put annotations in array list. +- Iterator iter = model.getAnnotationIterator(); ++ Iterator iter = model.getAnnotationIterator(); + if (iter != null) { + + //get the not collapsed (expanded) and sort them +- ArrayList expanded = new ArrayList(); ++ ArrayList expanded = new ArrayList(); + while (iter.hasNext()) { + PyProjectionAnnotation element = (PyProjectionAnnotation) iter.next(); + if (element.isCollapsed() == useExpanded) { +@@ -70,7 +72,7 @@ public int compare(Object o1, Object o2) { + * @return + */ + protected ProjectionAnnotationModel getModel() { +- final ProjectionAnnotationModel model = (ProjectionAnnotationModel) getTextEditor().getAdapter( ++ final ProjectionAnnotationModel model = getTextEditor().getAdapter( + ProjectionAnnotationModel.class); + return model; + } +diff --git a/plugins/org.python.pydev/src/org/python/pydev/editor/actions/codefolding/PyUnCollapseAll.java b/plugins/org.python.pydev/src/org/python/pydev/editor/actions/codefolding/PyUnCollapseAll.java +index 38ca5da..d8ae8e7 100644 +--- a/plugins/org.python.pydev/src/org/python/pydev/editor/actions/codefolding/PyUnCollapseAll.java ++++ b/plugins/org.python.pydev/src/org/python/pydev/editor/actions/codefolding/PyUnCollapseAll.java +@@ -1,5 +1,5 @@ + /** +- * Copyright (c) 2005-2013 by Appcelerator, Inc. All Rights Reserved. ++ * Copyright (c) 2005-2016 by Appcelerator, Inc. All Rights Reserved. + * Licensed under the terms of the Eclipse Public License (EPL). + * Please see the license.txt included with this distribution for details. + * Any modifications to this file must keep this entire header intact. +@@ -16,6 +16,7 @@ + import java.util.List; + + import org.eclipse.jface.action.IAction; ++import org.eclipse.jface.text.source.Annotation; + import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel; + import org.python.pydev.editor.codefolding.PyProjectionAnnotation; + +@@ -33,7 +34,7 @@ public void run(IAction action) { + + if (model != null) { + +- Iterator iter = getAnnotationsIterator(model, true); ++ Iterator iter = getAnnotationsIterator(model, true); + + if (iter != null) { + //we just want to expand the roots, and we are working only with the collapsed sorted by offset. +diff --git a/plugins/org.python.pydev/src/org/python/pydev/editor/codefolding/CodeFoldingSetter.java b/plugins/org.python.pydev/src/org/python/pydev/editor/codefolding/CodeFoldingSetter.java +index 13171e9..9c0fb35 100644 +--- a/plugins/org.python.pydev/src/org/python/pydev/editor/codefolding/CodeFoldingSetter.java ++++ b/plugins/org.python.pydev/src/org/python/pydev/editor/codefolding/CodeFoldingSetter.java +@@ -1,5 +1,5 @@ + /** +- * Copyright (c) 2005-2013 by Appcelerator, Inc. All Rights Reserved. ++ * Copyright (c) 2005-2016 by Appcelerator, Inc. All Rights Reserved. + * Licensed under the terms of the Eclipse Public License (EPL). + * Please see the license.txt included with this distribution for details. + * Any modifications to this file must keep this entire header intact. +@@ -167,16 +167,15 @@ public void run() { + /** + * Given the ast, create the needed marks and set them in the passed model. + */ +- @SuppressWarnings("unchecked") + private synchronized void addMarksToModel(SimpleNode root2, ProjectionAnnotationModel model) { + try { + if (model != null) { +- ArrayList existing = new ArrayList(); ++ ArrayList existing = new ArrayList(); + + //get the existing annotations +- Iterator iter = model.getAnnotationIterator(); ++ Iterator iter = model.getAnnotationIterator(); + while (iter != null && iter.hasNext()) { +- PyProjectionAnnotation element = iter.next(); ++ Annotation element = iter.next(); + existing.add(element); + } + +@@ -211,7 +210,7 @@ private synchronized void addMarksToModel(SimpleNode root2, ProjectionAnnotation + * If we don't find that, the end of the selection is the end of the file. + */ + private Map getAnnotationsToAdd(List nodes, +- ProjectionAnnotationModel model, List existing) { ++ ProjectionAnnotationModel model, List existing) { + + Map annotationsToAdd = new HashMap(); + try { +@@ -235,7 +234,7 @@ private synchronized void addMarksToModel(SimpleNode root2, ProjectionAnnotation + * added for it). + */ + private Tuple getAnnotationToAdd(FoldingEntry node, int start, int end, +- ProjectionAnnotationModel model, List existing) throws BadLocationException { ++ ProjectionAnnotationModel model, List existing) throws BadLocationException { + try { + IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput()); + int offset = document.getLineOffset(start); +@@ -261,9 +260,9 @@ private synchronized void addMarksToModel(SimpleNode root2, ProjectionAnnotation + * We have to be careful not to remove existing annotations because if this happens, previous code folding is not correct. + */ + private Tuple getAnnotationToAdd(Position position, FoldingEntry node, +- ProjectionAnnotationModel model, List existing) { +- for (Iterator iter = existing.iterator(); iter.hasNext();) { +- PyProjectionAnnotation element = iter.next(); ++ ProjectionAnnotationModel model, List existing) { ++ for (Iterator iter = existing.iterator(); iter.hasNext();) { ++ Annotation element = iter.next(); + Position existingPosition = model.getPosition(element); + if (existingPosition.equals(position)) { + //ok, do nothing to this annotation (neither remove nor add, as it already exists in the correct place). +diff --git a/plugins/org.python.pydev/src/org/python/pydev/editor/correctionassist/PythonCorrectionProcessor.java b/plugins/org.python.pydev/src/org/python/pydev/editor/correctionassist/PythonCorrectionProcessor.java +index 1751237..a706397 100644 +--- a/plugins/org.python.pydev/src/org/python/pydev/editor/correctionassist/PythonCorrectionProcessor.java ++++ b/plugins/org.python.pydev/src/org/python/pydev/editor/correctionassist/PythonCorrectionProcessor.java +@@ -1,5 +1,5 @@ + /** +- * Copyright (c) 2005-2013 by Appcelerator, Inc. All Rights Reserved. ++ * Copyright (c) 2005-2016 by Appcelerator, Inc. All Rights Reserved. + * Licensed under the terms of the Eclipse Public License (EPL). + * Please see the license.txt included with this distribution for details. + * Any modifications to this file must keep this entire header intact. +@@ -46,7 +46,6 @@ + import org.python.pydev.plugin.PydevPlugin; + import org.python.pydev.shared_ui.ImageCache; + +- + /** + * This class should be used to give context help + * +@@ -206,9 +205,9 @@ public boolean canFix(Annotation annotation) { + ICompletionProposal[] spellProps = null; + + IAnnotationModel annotationModel = editor.getPySourceViewer().getAnnotationModel(); +- Iterator it = annotationModel.getAnnotationIterator(); ++ Iterator it = annotationModel.getAnnotationIterator(); + while (it.hasNext()) { +- Object annotation = it.next(); ++ Annotation annotation = it.next(); + if (annotation instanceof SpellingAnnotation) { + SpellingAnnotation spellingAnnotation = (SpellingAnnotation) annotation; + SpellingProblem spellingProblem = spellingAnnotation.getSpellingProblem(); +@@ -225,11 +224,11 @@ public boolean canFix(Annotation annotation) { + + if (spellProps == null || (spellProps.length == 1 && spellProps[0] instanceof NoCompletionsProposal)) { + //no proposals from the spelling +- return (ICompletionProposal[]) results.toArray(new ICompletionProposal[results.size()]); ++ return results.toArray(new ICompletionProposal[results.size()]); + } + + //ok, add the spell problems and return... +- ICompletionProposal[] ret = (ICompletionProposal[]) results.toArray(new ICompletionProposal[results.size() ++ ICompletionProposal[] ret = results.toArray(new ICompletionProposal[results.size() + + spellProps.length]); + System.arraycopy(spellProps, 0, ret, results.size(), spellProps.length); + return ret; +@@ -237,7 +236,7 @@ public boolean canFix(Annotation annotation) { + if (e instanceof ClassNotFoundException || e instanceof LinkageError || e instanceof NoSuchMethodException + || e instanceof NoSuchMethodError || e instanceof NoClassDefFoundError) { + //Eclipse 3.2 support +- return (ICompletionProposal[]) results.toArray(new ICompletionProposal[results.size()]); ++ return results.toArray(new ICompletionProposal[results.size()]); + } + throw new RuntimeException(e); + }