import net.sourceforge.phpeclipse.phpeditor.PHPDocumentProvider;
import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
+import net.sourceforge.phpeclipse.resourcesview.*;
+
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.widgets.Shell;
/**
* The id of the PHP plugin (value <code>"net.sourceforge.phpeclipse"</code>).
*/
- public static final String ID_PLUGIN = "net.sourceforge.phpeclipse"; //$NON-NLS-1$
-
+ public static final String PLUGIN_ID = "net.sourceforge.phpeclipse"; //$NON-NLS-1$
+ public final static String PHP_NATURE_ID = PLUGIN_ID + ".phpnature";
+ public static final String PHP_RESOURCES_VIEW_ID = PLUGIN_ID + ".resourcesview.ViewPHPResources"; //$NON-NLS-1$
+
//The shared instance.
private static PHPeclipsePlugin plugin;
//Resource bundle.
// public static void log(Throwable e) {
// log(new Status(IStatus.ERROR, getPluginId(), JavaStatusConstants.INTERNAL_ERROR, JavaUIMessages.getString("JavaPlugin.internal_error"), e)); //$NON-NLS-1$
// }
-
+
+ public static void log(Throwable e) {
+ log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "PHPeclipsePlugin.internalErrorOccurred", e)); //$NON-NLS-1$
+ }
public static boolean isDebug() {
return getDefault().isDebugging();
}
PreferenceConverter.setDefault(store, PHP_DEFAULT, PHPColorProvider.DEFAULT);
}
+
+ public void startup() throws CoreException {
+ super.startup();
+ IAdapterManager manager= Platform.getAdapterManager();
+ manager.registerAdapters(new PHPElementAdapterFactory(), PHPElement.class);
+ manager.registerAdapters(new ResourceAdapterFactory(), IResource.class);
+ }
}
\ No newline at end of file