Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2006-07-03 09:49:47 +0000
committerAnton Leherbauer2006-07-03 09:49:47 +0000
commited4662692b2c299183f275d885e3247d1d7062b2 (patch)
treee1ae51c712d39c821515ec18cdb4bb9845ba939c /build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor
parent36c5a333f11f15e78b6495251140c516e892de12 (diff)
downloadorg.eclipse.cdt-ed4662692b2c299183f275d885e3247d1d7062b2.tar.gz
org.eclipse.cdt-ed4662692b2c299183f275d885e3247d1d7062b2.tar.xz
org.eclipse.cdt-ed4662692b2c299183f275d885e3247d1d7062b2.zip
Fix for bug 141295 - Avoid using deprecated extension point "documentCreation"
* Removed documentCreation extensions * Removed IDocumentFactory implementations * Removed PartiallySynchronizedDocument classes * Removed private SetUpSynchronization methods from document providers
Diffstat (limited to 'build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor')
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentFactory.java30
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentProvider.java14
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/PartiallySynchronizedDocument.java97
3 files changed, 1 insertions, 140 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentFactory.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentFactory.java
deleted file mode 100644
index cbe1ac414c5..00000000000
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.make.internal.ui.editor;
-
-import org.eclipse.jface.text.IDocument;
-
-/**
- * MakefileDocumentFactory
- */
-public class MakefileDocumentFactory {
- public MakefileDocumentFactory() {
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IDocumentFactory#createDocument()
- */
- public IDocument createDocument() {
- return new PartiallySynchronizedDocument();
- }
-
-}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentProvider.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentProvider.java
index 43cf8a97f98..2bdd21f3efd 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentProvider.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileDocumentProvider.java
@@ -7,6 +7,7 @@
*
* Contributors:
* QNX Software Systems - Initial API and implementation
+ * Anton Leherbauer (Wind River Systems) - Fixed bug 141295
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui.editor;
@@ -17,8 +18,6 @@ import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ISynchronizable;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.ForwardingDocumentProvider;
@@ -145,15 +144,4 @@ public class MakefileDocumentProvider extends TextFileDocumentProvider implement
disconnect(e.next());
}
-
- private void setUpSynchronization(MakefileFileInfo antInfo) {
- IDocument document= antInfo.fTextFileBuffer.getDocument();
- IAnnotationModel model= antInfo.fModel;
-
- if (document instanceof ISynchronizable && model instanceof ISynchronizable) {
- Object lock= ((ISynchronizable) document).getLockObject();
- ((ISynchronizable) model).setLockObject(lock);
- }
- }
-
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/PartiallySynchronizedDocument.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/PartiallySynchronizedDocument.java
deleted file mode 100644
index 21fa4d5d59d..00000000000
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/PartiallySynchronizedDocument.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.cdt.make.internal.ui.editor;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.ISynchronizable;
-
-/**
- * PartiallySynchronizedDocument
- * Document that can also be used by a background reconciler.
- */
-public class PartiallySynchronizedDocument extends Document implements ISynchronizable {
-
- private final Object fInternalLockObject= new Object();
- private Object fLockObject;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocumentExtension#startSequentialRewrite(boolean)
- */
- synchronized public void startSequentialRewrite(boolean normalized) {
- super.startSequentialRewrite(normalized);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocumentExtension#stopSequentialRewrite()
- */
- synchronized public void stopSequentialRewrite() {
- super.stopSequentialRewrite();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocument#get()
- */
- synchronized public String get() {
- return super.get();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocument#get(int, int)
- */
- synchronized public String get(int offset, int length) throws BadLocationException {
- return super.get(offset, length);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocument#getChar(int)
- */
- synchronized public char getChar(int offset) throws BadLocationException {
- return super.getChar(offset);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocument#replace(int, int, java.lang.String)
- */
- synchronized public void replace(int offset, int length, String text) throws BadLocationException {
- super.replace(offset, length, text);
- //TODO to be used for incremental parsing...not for 3.0
-// if (length == 0 && text != null) {
-// // Insert
-// } else if (text == null || text.length() == 0) {
-// // Remove
-// } else {
-// fAntModel.setReplaceHasOccurred();
-// }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocument#set(java.lang.String)
- */
- synchronized public void set(String text) {
- super.set(text);
- }
-
- /*
- * @see org.eclipse.jface.text.ISynchronizable#setLockObject(java.lang.Object)
- */
- public void setLockObject(Object lockObject) {
- fLockObject= lockObject;
- }
-
- /*
- * @see org.eclipse.jface.text.ISynchronizable#getLockObject()
- */
- public Object getLockObject() {
- return fLockObject == null ? fInternalLockObject : fLockObject;
- }
-}

Back to the top