mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PrintSettings - get rid of ExportableComponent
This commit is contained in:
@@ -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<PrintSettings>, ExportableComponent {
|
||||
public class PrintSettings implements PersistentStateComponent<PrintSettings> {
|
||||
@NonNls public String PAPER_SIZE = "A4";
|
||||
|
||||
public boolean COLOR_PRINTING = false;
|
||||
@@ -81,18 +73,6 @@ public class PrintSettings implements PersistentStateComponent<PrintSettings>, 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;
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
exportable.DaemonCodeAnalyzerSettings.presentable.name=Error highlighting
|
||||
exportable.PrintSettings.presentable.name=Print
|
||||
@@ -71,9 +71,7 @@
|
||||
serviceImplementation="com.intellij.execution.ui.layout.impl.RunnerLayoutSettings"/>
|
||||
<exportable serviceInterface="com.intellij.codeInsight.template.impl.TemplateSettings"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.codeEditor.printing.PrintSettings"
|
||||
serviceImplementation="com.intellij.codeEditor.printing.PrintSettings"/>
|
||||
<exportable serviceInterface="com.intellij.codeEditor.printing.PrintSettings"/>
|
||||
<applicationService serviceImplementation="com.intellij.codeEditor.printing.PrintSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings"
|
||||
serviceImplementation="com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettingsImpl"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user