Commit 8cf71e10 authored by claes's avatar claes

classgraph qualifier in command open graph

parent d7643d39
...@@ -69,8 +69,8 @@ public class JopSession { ...@@ -69,8 +69,8 @@ public class JopSession {
((JopSessionIfc) sessionRep).openLogin(); ((JopSessionIfc) sessionRep).openLogin();
} }
public void openGraphFrame( String name, String instance, boolean scrollbar) { public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph) {
((JopSessionIfc) sessionRep).openGraphFrame( name, instance, scrollbar); ((JopSessionIfc) sessionRep).openGraphFrame( name, instance, scrollbar, classGraph);
} }
public void openFlowFrame( PwrtObjid oid, String center) { public void openFlowFrame( PwrtObjid oid, String center) {
......
...@@ -14,7 +14,7 @@ public interface JopSessionIfc { ...@@ -14,7 +14,7 @@ public interface JopSessionIfc {
public void openNavigator( PwrtObjid oid); public void openNavigator( PwrtObjid oid);
public void openAlarmList(); public void openAlarmList();
public void openLogin(); public void openLogin();
public void openGraphFrame( String name, String instance, boolean scrollbar); public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph);
public void openFlowFrame( PwrtObjid oid, String center); public void openFlowFrame( PwrtObjid oid, String center);
public void openCrrFrame( String name); public void openCrrFrame( String name);
public void executeCommand( String command); public void executeCommand( String command);
......
...@@ -91,11 +91,31 @@ public class JopSessionRep implements JopSessionIfc { ...@@ -91,11 +91,31 @@ public class JopSessionRep implements JopSessionIfc {
} }
} }
public void openGraphFrame( String name, String instance, boolean scrollbar) { public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph) {
CdhrObjid oid = null; CdhrObjid oid = null;
if ( instance != null) { if ( instance != null) {
if ( instance.startsWith("&")) {
// Objid pointer attribute
CdhrString cstr = engine.gdh.getObjectInfoString( instance.substring(1));
if ( cstr.evenSts()) return;
instance = cstr.str;
}
oid = engine.gdh.nameToObjid( instance); oid = engine.gdh.nameToObjid( instance);
if ( oid.evenSts()) return; if ( oid.evenSts()) return;
if ( classGraph) {
CdhrClassId cid = engine.gdh.getObjectClass( oid.objid);
if ( cid.evenSts()) return;
CdhrObjid coid = engine.gdh.classIdToObjid( cid.classId);
if ( coid.evenSts()) return;
CdhrString sret = engine.gdh.objidToName( coid.objid, Cdh.mName_object);
if ( sret.evenSts()) return;
name = sret.str.substring(0,1).toUpperCase() + sret.str.substring(1).toLowerCase();
}
} }
Object graph; Object graph;
if ( oid == null) if ( oid == null)
......
...@@ -69,8 +69,8 @@ public class JopSession { ...@@ -69,8 +69,8 @@ public class JopSession {
((JopSessionIfc) sessionRep).openLogin(); ((JopSessionIfc) sessionRep).openLogin();
} }
public void openGraphFrame( String name, String instance, boolean scrollbar) { public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph) {
((JopSessionIfc) sessionRep).openGraphFrame( name, instance, scrollbar); ((JopSessionIfc) sessionRep).openGraphFrame( name, instance, scrollbar, classGraph);
} }
public void openFlowFrame( PwrtObjid oid, String center) { public void openFlowFrame( PwrtObjid oid, String center) {
......
...@@ -14,7 +14,7 @@ public interface JopSessionIfc { ...@@ -14,7 +14,7 @@ public interface JopSessionIfc {
public void openNavigator( PwrtObjid oid); public void openNavigator( PwrtObjid oid);
public void openAlarmList(); public void openAlarmList();
public void openLogin(); public void openLogin();
public void openGraphFrame( String name, String instance, boolean scrollbar); public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph);
public void openFlowFrame( PwrtObjid oid, String center); public void openFlowFrame( PwrtObjid oid, String center);
public void openCrrFrame( String name); public void openCrrFrame( String name);
public void executeCommand( String command); public void executeCommand( String command);
......
...@@ -91,11 +91,31 @@ public class JopSessionRep implements JopSessionIfc { ...@@ -91,11 +91,31 @@ public class JopSessionRep implements JopSessionIfc {
} }
} }
public void openGraphFrame( String name, String instance, boolean scrollbar) { public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph) {
CdhrObjid oid = null; CdhrObjid oid = null;
if ( instance != null) { if ( instance != null) {
if ( instance.startsWith("&")) {
// Objid pointer attribute
CdhrString cstr = engine.gdh.getObjectInfoString( instance.substring(1));
if ( cstr.evenSts()) return;
instance = cstr.str;
}
oid = engine.gdh.nameToObjid( instance); oid = engine.gdh.nameToObjid( instance);
if ( oid.evenSts()) return; if ( oid.evenSts()) return;
if ( classGraph) {
CdhrClassId cid = engine.gdh.getObjectClass( oid.objid);
if ( cid.evenSts()) return;
CdhrObjid coid = engine.gdh.classIdToObjid( cid.classId);
if ( coid.evenSts()) return;
CdhrString sret = engine.gdh.objidToName( coid.objid, Cdh.mName_object);
if ( sret.evenSts()) return;
name = sret.str.substring(0,1).toUpperCase() + sret.str.substring(1).toLowerCase();
}
} }
Object graph; Object graph;
if ( oid == null) if ( oid == null)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment