|
|
|
@ -61,18 +61,18 @@ public class VcsHelper implements JTemplateActionListener {
|
|
|
|
|
private final static String SERVICE_NAME_MOVE = "moveVcs"; |
|
|
|
|
private static final VcsHelper INSTANCE = new VcsHelper(); |
|
|
|
|
|
|
|
|
|
private volatile boolean isLegacyMode; |
|
|
|
|
private volatile boolean legacyMode; |
|
|
|
|
|
|
|
|
|
public static VcsHelper getInstance() { |
|
|
|
|
return INSTANCE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private VcsHelper() { |
|
|
|
|
isLegacyMode = WorkContext.getCurrent().get(VcsOperator.class).isLegacyMode(); |
|
|
|
|
legacyMode = WorkContext.getCurrent().get(VcsOperator.class).isLegacyMode(); |
|
|
|
|
EventDispatcher.listen(WorkspaceEvent.AfterSwitch, new Listener<Workspace>() { |
|
|
|
|
@Override |
|
|
|
|
public void on(Event event, Workspace param) { |
|
|
|
|
isLegacyMode = WorkContext.getCurrent().get(VcsOperator.class).isLegacyMode(); |
|
|
|
|
legacyMode = WorkContext.getCurrent().get(VcsOperator.class).isLegacyMode(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -209,7 +209,7 @@ public class VcsHelper implements JTemplateActionListener {
|
|
|
|
|
* @return 是否为老模式 |
|
|
|
|
*/ |
|
|
|
|
public boolean isLegacyMode() { |
|
|
|
|
return isLegacyMode; |
|
|
|
|
return legacyMode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|