From 60113686e7a81a10bcd7f139bb503a8d842044f6 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Thu, 25 Sep 2014 19:28:06 +0200 Subject: [PATCH] PrintSettings - get rid of ExportableComponent --- .../codeEditor/printing/PrintSettings.java | 26 +++---------------- .../src/messages/CodeEditorBundle.properties | 1 - .../src/messages/OptionsBundle.properties | 3 ++- .../src/META-INF/LangExtensions.xml | 4 +-- 4 files changed, 6 insertions(+), 28 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeEditor/printing/PrintSettings.java b/platform/lang-impl/src/com/intellij/codeEditor/printing/PrintSettings.java index 6dc2f546969a..e42c696ddd34 100644 --- a/platform/lang-impl/src/com/intellij/codeEditor/printing/PrintSettings.java +++ b/platform/lang-impl/src/com/intellij/codeEditor/printing/PrintSettings.java @@ -13,26 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package com.intellij.codeEditor.printing; -import com.intellij.openapi.application.PathManager; import com.intellij.openapi.components.*; import com.intellij.openapi.editor.colors.EditorColorsManager; import com.intellij.util.xmlb.XmlSerializerUtil; import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.NotNull; - -import java.io.File; @State( - name="PrintSettings", - storages= { - @Storage( - file = StoragePathMacros.APP_CONFIG + "/print.xml" - )} + name = "PrintSettings", + storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/print.xml")} ) -public class PrintSettings implements PersistentStateComponent, ExportableComponent { +public class PrintSettings implements PersistentStateComponent { @NonNls public String PAPER_SIZE = "A4"; public boolean COLOR_PRINTING = false; @@ -81,18 +73,6 @@ public class PrintSettings implements PersistentStateComponent, E return ServiceManager.getService(PrintSettings.class); } - @Override - @NotNull - public File[] getExportFiles() { - return new File[]{PathManager.getOptionsFile("print")}; - } - - @Override - @NotNull - public String getPresentableName() { - return CodeEditorBundle.message("title.print.settings"); - } - public int getPrintScope() { return myPrintScope; } diff --git a/platform/platform-resources-en/src/messages/CodeEditorBundle.properties b/platform/platform-resources-en/src/messages/CodeEditorBundle.properties index 9f5fa4790e87..82a29b7c5435 100644 --- a/platform/platform-resources-en/src/messages/CodeEditorBundle.properties +++ b/platform/platform-resources-en/src/messages/CodeEditorBundle.properties @@ -58,6 +58,5 @@ print.header.placement.footer=Footer print.header.alignment.left=Left print.header.alignment.center=Center print.header.alignment.right=Right -title.print.settings=Print settings print.file.page.progress=Printing {0}. Page {1}... file.not.found=File not found: {0} diff --git a/platform/platform-resources-en/src/messages/OptionsBundle.properties b/platform/platform-resources-en/src/messages/OptionsBundle.properties index 0d61a7d254ab..732090eddcbe 100644 --- a/platform/platform-resources-en/src/messages/OptionsBundle.properties +++ b/platform/platform-resources-en/src/messages/OptionsBundle.properties @@ -281,4 +281,5 @@ options.general.attribute.descriptor.live.template=Live Template exportable.EditorSettings.presentable.name=Editor exportable.AbbreviationManager.presentable.name=Actions exportable.FindSettings.presentable.name=Find -exportable.DaemonCodeAnalyzerSettings.presentable.name=Error highlighting settings \ No newline at end of file +exportable.DaemonCodeAnalyzerSettings.presentable.name=Error highlighting +exportable.PrintSettings.presentable.name=Print \ No newline at end of file diff --git a/platform/platform-resources/src/META-INF/LangExtensions.xml b/platform/platform-resources/src/META-INF/LangExtensions.xml index 2ec91547b45c..abf4d6ae27de 100644 --- a/platform/platform-resources/src/META-INF/LangExtensions.xml +++ b/platform/platform-resources/src/META-INF/LangExtensions.xml @@ -71,9 +71,7 @@ serviceImplementation="com.intellij.execution.ui.layout.impl.RunnerLayoutSettings"/> - - +