Revert "Added support for remote logging of editor usage."
This reverts commit 0d67fa52f494e13feb2250e0a3888ca5389d6b74.
diff --git a/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
index 7b696f1..7794d75 100644
--- a/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
@@ -26,7 +26,6 @@
Export-Package: com.google.eclipse.protobuf.ui.contentassist,
com.google.eclipse.protobuf.ui.contentassist.antlr,
com.google.eclipse.protobuf.ui.editor,
- com.google.eclipse.protobuf.ui.editor.logging,
com.google.eclipse.protobuf.ui.plugin,
com.google.eclipse.protobuf.ui.preferences,
com.google.eclipse.protobuf.ui.preferences.compiler,
diff --git a/com.google.eclipse.protobuf.ui/plugin.xml b/com.google.eclipse.protobuf.ui/plugin.xml
index 7b7c4da..8edb1b1 100644
--- a/com.google.eclipse.protobuf.ui/plugin.xml
+++ b/com.google.eclipse.protobuf.ui/plugin.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
- <extension-point id="remoteLogging" name="Remote Logging" schema="schema/remoteLogging.exsd"/>
<extension point="org.eclipse.ui.editors">
<editor class="com.google.eclipse.protobuf.ui.ProtobufExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" default="true" icon="icons/pb.gif"
@@ -257,4 +256,4 @@
<newWizardShortcut id="com.google.eclipse.protobuf.ui.wizards.NewProtoFileWizard" />
</perspectiveExtension>
</extension>
-</plugin>
+</plugin>
\ No newline at end of file
diff --git a/com.google.eclipse.protobuf.ui/schema/remoteLogging.exsd b/com.google.eclipse.protobuf.ui/schema/remoteLogging.exsd
deleted file mode 100644
index 7f16700..0000000
--- a/com.google.eclipse.protobuf.ui/schema/remoteLogging.exsd
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="com.google.eclipse.protobuf.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="com.google.eclipse.protobuf.ui" id="remoteLoggin" name="Remote Logging"/>
- </appInfo>
- <documentation>
- Provides support for remote logging.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="editorUsage">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":com.google.eclipse.protobuf.ui.editor.logging.EditorUsageLogger"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.2.7
- </documentation>
- </annotation>
-
-
-
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2012 Google, 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
-
-Contributors:
-Google, Inc. - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/logging/EditorUsageLogger.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/logging/EditorUsageLogger.java
deleted file mode 100644
index e6fd701..0000000
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/logging/EditorUsageLogger.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2012 Google 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 com.google.eclipse.protobuf.ui.editor.logging;
-
-import org.eclipse.ui.IEditorInput;
-
-/**
- * Logs usage of the Protocol Buffer editor.
- *
- * @author alruiz@google.com (Alex Ruiz)
- */
-public interface EditorUsageLogger {
- void logDocumentCreation(IEditorInput editorInput);
-}
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/logging/RemoteLogger.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/logging/RemoteLogger.java
deleted file mode 100644
index 999bb4d..0000000
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/logging/RemoteLogger.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2012 Google 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 com.google.eclipse.protobuf.ui.editor.logging;
-
-import static java.util.logging.Level.SEVERE;
-
-import com.google.inject.*;
-
-import org.eclipse.core.runtime.*;
-
-import java.util.logging.Logger;
-
-/**
- * @author alruiz@google.com (Alex Ruiz)
- */
-@Singleton public class RemoteLogger {
- private static final String EXTENSION_ID = "com.google.eclipse.protobuf.ui.remoteLogging";
-
- private static Logger logger = Logger.getLogger(RemoteLogger.class.getCanonicalName());
-
- @Inject private IExtensionRegistry registry;
-
- private boolean initialized;
- private EditorUsageLogger editorUsageLogger;
-
- private final Object lock = new Object();
-
- public EditorUsageLogger editorUsage() {
- synchronized (lock) {
- if (!initialized) {
- initialize();
- }
- return editorUsageLogger;
- }
- }
-
- private void initialize() {
- initialized = true;
- IConfigurationElement[] config = registry.getConfigurationElementsFor(EXTENSION_ID);
- if (config == null) {
- return;
- }
- for (IConfigurationElement e : config) {
- if ("editorUsage".equals(e.getName()) && editorUsageLogger == null) {
- try {
- editorUsageLogger = (EditorUsageLogger) e.createExecutableExtension("class");
- } catch (CoreException error) {
- logger.log(SEVERE, "Unable to create 'editorUsage' instance", error);
- }
- }
- }
- }
-}
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/model/ProtobufDocumentProvider.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/model/ProtobufDocumentProvider.java
index e32e226..5c53b9f 100644
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/model/ProtobufDocumentProvider.java
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/editor/model/ProtobufDocumentProvider.java
@@ -16,10 +16,7 @@
import static org.eclipse.core.filebuffers.LocationKind.*;
import static org.eclipse.text.undo.DocumentUndoManagerRegistry.getDocumentUndoManager;
-import com.google.eclipse.protobuf.ui.editor.logging.*;
-import com.google.eclipse.protobuf.ui.preferences.editor.save.SaveActionsPreferences;
-import com.google.eclipse.protobuf.ui.util.editor.ChangedLineRegionCalculator;
-import com.google.inject.*;
+import java.util.List;
import org.eclipse.core.filebuffers.*;
import org.eclipse.core.runtime.*;
@@ -30,7 +27,9 @@
import org.eclipse.ui.*;
import org.eclipse.xtext.ui.editor.model.*;
-import java.util.List;
+import com.google.eclipse.protobuf.ui.preferences.editor.save.SaveActionsPreferences;
+import com.google.eclipse.protobuf.ui.util.editor.ChangedLineRegionCalculator;
+import com.google.inject.*;
/**
* @author alruiz@google.com (Alex Ruiz)
@@ -40,7 +39,6 @@
@Inject private ChangedLineRegionCalculator calculator;
@Inject private Provider<SaveActionsPreferences> preferencesProvider;
- @Inject private RemoteLogger logger;
@Inject private SaveActions saveActions;
private final List<DocumentContentsFactory> documentFactories;
@@ -50,22 +48,12 @@
}
@Override protected ElementInfo createElementInfo(Object element) throws CoreException {
- logEditorUsage(element);
if (findDocumentFactory(element) != null) {
return createElementInfo((IEditorInput) element);
}
return super.createElementInfo(element);
}
- private void logEditorUsage(Object element) {
- EditorUsageLogger editorUsageLogger = logger.editorUsage();
- IEditorInput editorInput = null;
- if (element instanceof IEditorInput) {
- editorInput = (IEditorInput) element;
- }
- editorUsageLogger.logDocumentCreation(editorInput);
- }
-
private ElementInfo createElementInfo(IEditorInput input) throws CoreException {
IDocument document = null;
IStatus status = null;