import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
/**
* External tools plug-in class
}
/**
- * @see org.eclipse.core.runtime.Plugin#startup()
+ * @throws Exception
+ * @see org.eclipse.core.runtime.Plugin#start(BundleContext context)
*/
- public void startup() throws CoreException {
- // super.startup();
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
getStandardDisplay().asyncExec(new Runnable() {
public void run() {
//initialize the variable context manager
}
/**
- * @see org.eclipse.core.runtime.Plugin#shutdown()
+ * @throws Exception
+ * @see org.eclipse.core.runtime.Plugin#stop(BundleContext context)
*/
- public void shutdown() throws CoreException {
- // super.shutdown();
+ public void stop(BundleContext context) throws Exception {
ColorManager.getDefault().dispose();
+ super.stop(context);
}
/**
<!-- <library name="lib/xstream-1.0.2.jar" /> -->
</runtime>
<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
+ <import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.ui.console"/>
<import plugin="org.eclipse.core.resources"/>
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
/**
- * A buffered document scanner. The buffer always contains a section
+ * A buffered document scanner. The buffer always contains a section
* of a fixed size of the document to be scanned.
*/
/** The offset of the scanner within the buffer. */
private int fOffset;
-
+
/**
* Creates a new buffered document scanner.
* The buffer size is set to the given number of characters.
- *
+ *
* @param size the buffer size
*/
public BufferedDocumentScanner(int size) {
private final void updateBuffer(int offset) {
fBufferOffset= offset;
-
+
if (fBufferOffset + fBuffer.length > fRangeOffset + fRangeLength)
fBufferLength= fRangeLength - (fBufferOffset - fRangeOffset);
else
return fBuffer[fOffset++];
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println("Offset:"+fOffset);
- System.out.println("Buffer:"+fBuffer);
+ System.out.println("Buffer:"+fBuffer.toString());
throw e;
}
}
updateBuffer(fBufferOffset - fBuffer.length);
fOffset= fBuffer.length - 1;
}
- } else {
+ } else {
--fOffset;
}
}
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
/**
* The constructor.
*/
- public PHPeclipsePlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public PHPeclipsePlugin() {
+ super();
plugin = this;
// externalTools = new ExternalToolsPlugin();