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K4?AeaL_^pw1~-d+-YzF@rshWaSeq3og_z?Kv?_W2BTkx0!tdc)
zx(fcRNNPLB classForHighlightAction() {
- return MyHighlightAction.class;
+ return AlignHighlightAction.class;
}
@Override
public ConditionAttrSingleConditionPane appearanceForCondition(ConditionAttributesPane conditionAttributesPane) {
- return new MyHighlightPane(conditionAttributesPane);
+ return new AlignHighlightPane(conditionAttributesPane);
}
}
\ No newline at end of file
diff --git a/src/com/fr/plugin/cell/highlight/MyCellHighlightLocaleFinder.java b/src/main/java/com/fr/plugin/cell/highlight/AlignHighlightLocaleBridge.java
similarity index 81%
rename from src/com/fr/plugin/cell/highlight/MyCellHighlightLocaleFinder.java
rename to src/main/java/com/fr/plugin/cell/highlight/AlignHighlightLocaleBridge.java
index 207d427..20fe2e8 100644
--- a/src/com/fr/plugin/cell/highlight/MyCellHighlightLocaleFinder.java
+++ b/src/main/java/com/fr/plugin/cell/highlight/AlignHighlightLocaleBridge.java
@@ -5,7 +5,7 @@ import com.fr.stable.fun.impl.AbstractLocaleFinder;
/**
* Created by richie on 16/1/22.
*/
-public class MyCellHighlightLocaleFinder extends AbstractLocaleFinder {
+public class AlignHighlightLocaleBridge extends AbstractLocaleFinder {
@Override
public int currentAPILevel() {
diff --git a/src/com/fr/plugin/cell/highlight/MyHighlightAction.java b/src/main/java/com/fr/plugin/cell/highlight/fun/AlignHighlightAction.java
similarity index 51%
rename from src/com/fr/plugin/cell/highlight/MyHighlightAction.java
rename to src/main/java/com/fr/plugin/cell/highlight/fun/AlignHighlightAction.java
index 1c55a06..b2c592a 100644
--- a/src/com/fr/plugin/cell/highlight/MyHighlightAction.java
+++ b/src/main/java/com/fr/plugin/cell/highlight/fun/AlignHighlightAction.java
@@ -1,15 +1,14 @@
-package com.fr.plugin.cell.highlight;
+package com.fr.plugin.cell.highlight.fun;
import com.fr.base.Style;
-import com.fr.plugin.ExtraClassManager;
+import com.fr.intelli.record.Focus;
+import com.fr.intelli.record.Original;
import com.fr.plugin.PluginLicense;
import com.fr.plugin.PluginLicenseManager;
-import com.fr.plugin.cell.highlight.fun.MyCellFunctionProcessor;
+import com.fr.record.analyzer.EnableMetrics;
import com.fr.report.cell.cellattr.highlight.AbstractStyleHighlightAction;
+import com.fr.stable.AssistUtils;
import com.fr.stable.Constants;
-import com.fr.stable.fun.FunctionHelper;
-import com.fr.stable.fun.FunctionProcessor;
-import com.fr.stable.fun.impl.AbstractFunctionProcessor;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
@@ -18,27 +17,16 @@ import com.fr.stable.xml.XMLableReader;
* @date 2015-03-26
* @since 8.0
*/
-public class MyHighlightAction extends AbstractStyleHighlightAction {
-
- private static final FunctionProcessor PPP = new AbstractFunctionProcessor() {
- @Override
- public int getId() {
- return FunctionHelper.generateFunctionID(MyConstants.PLUGIN_ID);
- }
-
- @Override
- public String getLocaleKey() {
- return "Plugin-Highlight_Align";
- }
- };
+@EnableMetrics
+public class AlignHighlightAction extends AbstractStyleHighlightAction {
private int align = Constants.RIGHT;
- public MyHighlightAction() {
+ public AlignHighlightAction() {
this(Constants.RIGHT, 0);
}
- public MyHighlightAction(int align, int scope) {
+ public AlignHighlightAction(int align, int scope) {
super(scope);
this.align = align;
}
@@ -48,12 +36,9 @@ public class MyHighlightAction extends AbstractStyleHighlightAction {
}
@Override
+ @Focus(id = AlignHighlightConstants.PLUGIN_ID, text = "Plugin-Highlight_Align", source = Original.PLUGIN)
protected Style modStyle(Style style) {
- FunctionProcessor processor= ExtraClassManager.getInstance().getFunctionProcessor();
- if(processor!=null){
- processor.recordFunction(PPP);
- }
- PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID(MyConstants.PLUGIN_ID);
+ PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID(AlignHighlightConstants.PLUGIN_ID);
if (pluginLicense != null && pluginLicense.isAvailable()) {
return style.deriveHorizontalAlignment(align);
}
@@ -64,7 +49,7 @@ public class MyHighlightAction extends AbstractStyleHighlightAction {
public void readXML(XMLableReader reader) {
if (reader.isChildNode()) {
String tagName = reader.getTagName();
- if (tagName.equals("MyAlign")) {
+ if (tagName.equals("Align")) {
align = reader.getAttrAsInt("align", Constants.RIGHT);
}
}
@@ -72,13 +57,23 @@ public class MyHighlightAction extends AbstractStyleHighlightAction {
@Override
public void writeXML(XMLPrintWriter writer) {
- writer.startTAG("MyAlign").attr("align", align);
+ writer.startTAG("Align").attr("align", align);
writer.end();
}
+ @Override
+ public boolean equals(Object o) {
+ return o instanceof AlignHighlightAction && super.equals(o) && ((AlignHighlightAction) o).align == align;
+ }
+
+ @Override
+ public int hashCode() {
+ return AssistUtils.hashCode(align);
+ }
+
public Object clone() throws CloneNotSupportedException {
- MyHighlightAction cloned = (MyHighlightAction)super.clone();
+ AlignHighlightAction cloned = (AlignHighlightAction) super.clone();
cloned.align = align;
- return cloned;
+ return cloned;
}
}
\ No newline at end of file
diff --git a/src/com/fr/plugin/cell/highlight/MyConstants.java b/src/main/java/com/fr/plugin/cell/highlight/fun/AlignHighlightConstants.java
similarity index 51%
rename from src/com/fr/plugin/cell/highlight/MyConstants.java
rename to src/main/java/com/fr/plugin/cell/highlight/fun/AlignHighlightConstants.java
index 49ceb49..c965fc6 100644
--- a/src/com/fr/plugin/cell/highlight/MyConstants.java
+++ b/src/main/java/com/fr/plugin/cell/highlight/fun/AlignHighlightConstants.java
@@ -1,10 +1,10 @@
-package com.fr.plugin.cell.highlight;
+package com.fr.plugin.cell.highlight.fun;
/**
* Created by richie on 16/3/30.
*/
-public class MyConstants {
+public class AlignHighlightConstants {
- public static final String PLUGIN_ID = "com.fr.plugin.cell.highlight.align";
+ public static final String PLUGIN_ID = "com.fr.plugin.cell.highlight.align.v10";
}
diff --git a/src/com/fr/plugin/cell/highlight/MyHighlightPane.java b/src/main/java/com/fr/plugin/cell/highlight/ui/AlignHighlightPane.java
similarity index 68%
rename from src/com/fr/plugin/cell/highlight/MyHighlightPane.java
rename to src/main/java/com/fr/plugin/cell/highlight/ui/AlignHighlightPane.java
index ed4b5af..0e81a5a 100644
--- a/src/com/fr/plugin/cell/highlight/MyHighlightPane.java
+++ b/src/main/java/com/fr/plugin/cell/highlight/ui/AlignHighlightPane.java
@@ -1,10 +1,11 @@
-package com.fr.plugin.cell.highlight;
+package com.fr.plugin.cell.highlight.ui;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIDictionaryComboBox;
import com.fr.general.Inter;
+import com.fr.plugin.cell.highlight.fun.AlignHighlightAction;
import com.fr.report.cell.cellattr.highlight.HighlightAction;
import com.fr.stable.Constants;
@@ -15,11 +16,11 @@ import javax.swing.*;
* @date 2015-03-26
* @since 8.0
*/
-public class MyHighlightPane extends ConditionAttrSingleConditionPane {
+public class AlignHighlightPane extends ConditionAttrSingleConditionPane {
private UIDictionaryComboBox alignComboBox;
private JComboBox scopeComboBox;
- public MyHighlightPane(ConditionAttributesPane conditionAttributesPane) {
+ public AlignHighlightPane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
this.alignComboBox = new UIDictionaryComboBox(
new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT},
@@ -30,9 +31,9 @@ public class MyHighlightPane extends ConditionAttrSingleConditionPane