Commit 9c4c1fd8 authored by claes's avatar claes

Changes from V3.4b copied

parent 38436917
......@@ -7,8 +7,6 @@
#include "rt_mh_outunit.h"
#include "rt_mh_util.h"
#include "rt_gdh.h"
#include "co_cdh.h"
#include "co_dcli.h"
......@@ -16,39 +14,11 @@
#include "co_cdh_msg.h"
#include "rt_gdh_msg.h"
/*frn xtt_ev.cpp*/
pwr_tStatus ev_mh_ack_bc( mh_sAck *MsgP);
pwr_tStatus ev_mh_return_bc( mh_sReturn *MsgP);
pwr_tStatus ev_mh_alarm_bc( mh_sMessage *MsgP);
pwr_tStatus ev_mh_info_bc( mh_sMessage *MsgP);
pwr_tStatus ev_mh_clear_alarmlist_bc( pwr_tNodeIndex nix);
/*slut p frn xtt_ev.cpp*/
const int EventType_Info = 0;
const int EventType_Return = 1;
const int EventType_Ack = 2;
const int EventType_Alarm = 3;
const int EventType_ClearAlarmList = 4;
/*frn jpwr_rt_gdh.c
typedef struct {
char TypeStr[32];
pwr_eType Type;
int Size;
} gdh_sSuffixTable;
static int gdh_ExtractNameSuffix( char *Name,
char **Suffix);
static void gdh_TranslateSuffixToClassData (
char *SuffixPtr,
pwr_eType *PwrType,
int *PwrSize,
int *NoOfElements);
static int gdh_StringToAttr( char *str_value, char *buffer_p, int buffer_size,
pwr_eType attrtype, int attrsize);
static void gdh_AttrToString( int type_id, void *value_ptr,
char *str, int size, int *len, char *format);
static void gdh_ConvertUTFstring( char *out, char *in);
//slut p frn jpwr_rt_gdh.c
*/
jclass Mh_id;
jmethodID Mh_messReceived_id;
......@@ -72,7 +42,7 @@ JNIEXPORT void JNICALL Java_jpwr_rt_Mh_initIDs
sts = (*env)->GetJavaVM(env, &jvm);
if(sts)
{
printf("Skit vid GetJavaVM\n");
printf("Hittar ej JavaVM\n");
}
}
......@@ -110,7 +80,6 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitAck
//hmta upp classid och sedan pekare till konstruktorn fr PwrtStatus
pwrtStatus_cid = (*env)->GetMethodID( env, pwrtStatus_id,
"<init>", "(I)V");
printf("efter status methodidhmtning\n");
if(pwrtStatus_cid == NULL)
{
printf("fel vid PwrtStatus methodidhmtning\n");
......@@ -147,31 +116,21 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitAck
sts = -2;//lyckades inte hitta fltet
}
//printf("efter birthtime hmtning\n");
eventId.Nix = (pwr_tNodeIndex)(*env)->GetIntField(env,id,nix_fid);
eventId.Idx = (pwr_tUInt32)(*env)->GetIntField(env,id,idx_fid);
//printf("efter getfielad\n");
jstr = (*env)->GetObjectField(env,id,birthTime_fid);
(const char *)str_copy = (*env)->GetStringUTFChars(env,jstr,NULL);
//strcpy(str, str_copy);
if (str_copy ==NULL)
{
sts = -1;//out of memory
}
//printf("efter strcpy\n");
//printf("str = %s", str);
time_AsciiToA(str_copy, &eventId.BirthTime);
//printf("efter AsciiToA\n");
//printf("eventid= %d %d ", eventId.Idx, eventId.Nix);
sts = mh_OutunitAck(&eventId);
//printf("efter outunitack2 sts %d\n", sts);
(*env)->ReleaseStringUTFChars(env,jstr,str_copy);
//(*env)->ReleaseStringUTFChars(env,jstr,str);
jsts = (jint) sts;
//skapa returobjekt
......@@ -222,22 +181,9 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitConnect
//hmta oix och vid fr objektet som skickats med frn anroparen
user.oix = (*env)->CallIntMethod( env, objid_obj, PwrtObjid_getOix);
user.vid = (*env)->CallIntMethod( env, objid_obj, PwrtObjid_getVid);
//printf("user.oix = %d user.vid = %d\n", user.oix, user.vid);
// Wait for mh has flagged initizated qqq vad r detta
//printf("innan waitformh\n");
mh_UtilWaitForMh();
//printf("efter waitformh\n");
/*
sts = gdh_ObjidToPointer ( user, (pwr_tAddress *) &userobject_ptr);
if ( EVEN(sts))
{
printf("skit vid objidtopinter\n");
}
*/
//gr connect
sts = mh_OutunitConnect(
......@@ -253,8 +199,6 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitConnect
ev_mh_info_bc,
ev_mh_return_bc
);
//printf("I connect C-kod sts= %d\n", sts);
jsts = (jint) sts;
//skapa returobjekt
......@@ -279,7 +223,6 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitDisConnect
"<init>", "(I)V");
sts = mh_OutunitDisconnect();
//printf("I disconnect C-kod sts= %d\n", sts);
jsts = (jint) sts;
......@@ -312,16 +255,13 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Mh_outunitReceive
//hmta upp classid och sedan pekare till konstruktorn fr PwrtStatus
pwrtStatus_cid = (*env)->GetMethodID( env, pwrtStatus_id,
"<init>", "(I)V");
printf("efter PwrtStatus methodid hmtning\n");
if(pwrtStatus_cid == NULL)
{
printf("fel vid PwrtStatus methodid hmtning\n");
return NULL;
}
}
//printf("Innan receive C-kod\n");
sts = mh_OutunitReceive();
//printf("Efter receive C-kod sts= %d\n", sts);
jsts = (jint) sts;
//skapa returobjekt
......@@ -426,7 +366,7 @@ pwr_tStatus ev_mh_return_bc( mh_sReturn *MsgP)
char birthTime_str[40];
pwr_tObjid objid = MsgP->Info.SupObject;
pwr_tObjid objid = MsgP->Info.Object;
pwr_tTime time = MsgP->Info.EventTime;
pwr_tTime birthTime = MsgP->Info.Id.BirthTime;
......@@ -494,7 +434,7 @@ pwr_tStatus ev_mh_alarm_bc( mh_sMessage *MsgP)
char birthTime_str[40];
pwr_tObjid objid = MsgP->Info.SupObject;
pwr_tObjid objid = MsgP->Info.Object;
pwr_tTime time = MsgP->Info.EventTime;
pwr_tTime birthTime = MsgP->Info.Id.BirthTime;
......@@ -562,7 +502,7 @@ pwr_tStatus ev_mh_info_bc( mh_sMessage *MsgP)
char birthTime_str[40];
pwr_tObjid objid = MsgP->Info.SupObject;
pwr_tObjid objid = MsgP->Info.Object;
pwr_tTime time = MsgP->Info.EventTime;
pwr_tTime birthTime = MsgP->Info.Id.BirthTime;
......
......@@ -214,11 +214,7 @@ public class FlowFrame extends JFrame implements JopUtilityIfc {
System.out.println( "Menu: " + e.getActionCommand());
if ( e.getActionCommand().equals("Close")) {
for ( int i = 0; i < ctx.cmn.a.size(); i++) {
Object o = ctx.cmn.a.get(i);
engine.remove( o);
session.removeUtility( this);
}
closeFlow();
dispose();
}
if ( e.getActionCommand().equals("Show Crossreferences")) {
......@@ -299,15 +295,19 @@ public class FlowFrame extends JFrame implements JopUtilityIfc {
return null;
}
public void closeFlow() {
for ( int i = 0; i < ctx.cmn.a.size(); i++) {
Object o = ctx.cmn.a.get(i);
engine.remove( o);
}
session.removeUtility( this);
}
// Exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
for ( int i = 0; i < ctx.cmn.a.size(); i++) {
Object o = ctx.cmn.a.get(i);
engine.remove( o);
session.removeUtility( this);
}
closeFlow();
}
}
}
......
......@@ -11,6 +11,8 @@ public class JopOpWindow extends JPanel {
Object root;
public JopOpWindow( JopSession session, Object root) {
// super( BoxLayout.Y_AXIS);
// createGlue();
this.session = session;
this.root = root;
en = session.getEngine();
......@@ -147,11 +149,18 @@ public class JopOpWindow extends JPanel {
boolean scrollbar;
String instance;
public Dimension getPreferredSize() {
return new Dimension( 200, 25);
}
public Dimension getMininumSize() { return getPreferredSize();}
public Dimension getMaximumSize() { return getPreferredSize();}
public OpWindButton( JopSession bsession, String name, String text, int btype) {
this.session = bsession;
this.action = name;
this.type = btype;
setText( text);
setHorizontalTextPosition( SwingConstants.LEFT);
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
switch ( type) {
......
......@@ -38,7 +38,7 @@ public class JopOpWindowFrame extends JFrame {
scrollPane = new JScrollPane(localPanel);
contentPane.add(scrollPane, BorderLayout.CENTER);
contentPane.setOpaque(true);
localPanel.setLayout(new BoxLayout( localPanel, BoxLayout.Y_AXIS));
localPanel.setLayout( new BoxLayout( localPanel, BoxLayout.Y_AXIS));
localPanel.setOpaque(true);
localPanel.setBackground( Color.white);
this.setTitle("Operator Window");
......@@ -55,3 +55,5 @@ public class JopOpWindowFrame extends JFrame {
}
}
}
......@@ -51,7 +51,7 @@ public class JopSessionRep implements JopSessionIfc {
public void openAlarmList() {
if ( alarmList == null) {
alarmList = new MhFrame();
alarmList = new MhFrame(session);
alarmList.setVisible( true);
}
else {
......
......@@ -25,6 +25,11 @@ import java.awt.event.*;
*/
public class MhFrame extends JFrame
{
JopSession session;
JopEngine engine;
XttTree xttTree;
Object root;
/** Description of the Field */
BorderLayout borderLayout1 = new BorderLayout();
......@@ -54,6 +59,7 @@ public class MhFrame extends JFrame
/** Constructor for the MhClient object */
/*
public MhFrame()
{
addWindowListener(
......@@ -68,7 +74,24 @@ public class MhFrame extends JFrame
this.init();
}
*/
public MhFrame()
{
engine = new JopEngine( 1000, (Object)this);
session = new JopSession( engine, (Object)this);
root = (Object) this;
init();
}
public MhFrame( JopSession session)
{
this.session = session;
engine = session.getEngine();
root = session.getRoot();
init();
}
/** Description of the Method */
public void destroy()
{
......@@ -110,7 +133,7 @@ public class MhFrame extends JFrame
messagePanel.add(labelMessage, BorderLayout.NORTH);
//Logg.logg("MhClient: Fre XttTree-skapande", 6);
this.mhTable = new MhTable(this, false, this.labelMessage);
this.mhTable = new MhTable(root, false, this.labelMessage);
//Logg.logg("MhClient: mhTable-skapande klart", 6);
this.contentPane.add(this.mhTable.splitPane, BorderLayout.CENTER);
......
......@@ -105,7 +105,6 @@ public class MhTable extends JPanel
//Create the scroll pane and add the table to it.
scrollPaneEv = new JScrollPane(eventTable);
scrollPaneEv.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
//scrollPaneEv.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
//Add the scroll pane to this window.
this.initColumnSizes(eventTable, evModel, false);
scrollPaneEv.getViewport().setBackground(Color.white);
......@@ -204,10 +203,15 @@ public class MhTable extends JPanel
{
URL url;
String urlString = "127.0.0.1";
if(root instanceof JApplet)
try
{
url = ((JApplet)root).getCodeBase();
urlString = url.getHost();
if(url != null)
urlString = url.getHost();
}
catch(Exception e)
{
System.out.println(e.toString());
}
if(trace)
{
......
......@@ -33,7 +33,7 @@ public class XttTree extends JPanel
JTextField userValue = new JTextField(25);
/** Description of the Field */
JLabel userValueLabel = new JLabel("Value input: ");
JLabel labelMessage = new JLabel("Jonas Nylund was here");
JLabel labelMessage = new JLabel("Navigator ver 1.0");
Dimension size;
/** Description of the Field */
JTree tree;
......@@ -276,7 +276,7 @@ public class XttTree extends JPanel
//then expand row 0 so we can se the rootlevel in the system
tree.expandRow(0);
tree.setScrollsOnExpand(false);
tree.setScrollsOnExpand(true);
tree.setRootVisible(false);
tree.setShowsRootHandles(true);
tree.setSelectionRow(0);
......@@ -701,6 +701,10 @@ public class XttTree extends JPanel
String str = this.gdh.objidToName(objid, Cdh.mName_pathStrict).str;
if(str != null)
this.find(str);
TreePath selectedPath = this.tree.getSelectionPath();
System.out.println(selectedPath);
if(selectedPath != null)
this.tree.scrollPathToVisible(selectedPath);
}
public void find(String userStr)
......@@ -793,11 +797,11 @@ public class XttTree extends JPanel
System.out.println("Hittat skvg");
TreePath tp = new TreePath(tn.getPath());
if(tn.isLeaf())
{
addObjectInfo(tp);
}
else
// if(tn.isLeaf())
// {
// addObjectInfo(tp);
// }
// else
this.tree.expandPath(tp);
this.tree.setSelectionPath(tp);
return tp;
......
......@@ -398,12 +398,13 @@ public class GdhServer
String attrName = in.readUTF();
CdhrBoolean ret = gdh.getObjectInfoBoolean(attrName);
out.writeInt(ret.sts);
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeBoolean(ret.value);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -416,12 +417,13 @@ public class GdhServer
String attrName = in.readUTF();
CdhrInt ret = gdh.getObjectInfoInt(attrName);
out.writeInt(ret.sts);
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.value);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -434,12 +436,13 @@ public class GdhServer
String attrName = in.readUTF();
CdhrFloat ret = gdh.getObjectInfoFloat(attrName);
out.writeInt(ret.sts);
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeFloat(ret.value);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -452,12 +455,13 @@ public class GdhServer
String attrName = in.readUTF();
CdhrString ret = gdh.getObjectInfoString(attrName);
out.writeInt(ret.sts);
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeUTF(ret.str);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -470,13 +474,14 @@ public class GdhServer
String name = in.readUTF();
CdhrObjid ret = gdh.getObjectInfoObjid(name);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -901,13 +906,14 @@ public class GdhServer
PwrtObjid objid = new PwrtObjid(oix, vid);
CdhrObjid ret = gdh.getChild(objid);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -922,13 +928,14 @@ public class GdhServer
PwrtObjid objid = new PwrtObjid(oix, vid);
CdhrObjid ret = gdh.getParent(objid);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -943,13 +950,14 @@ public class GdhServer
PwrtObjid objid = new PwrtObjid(oix, vid);
CdhrObjid ret = gdh.getNextSibling(objid);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -981,13 +989,14 @@ public class GdhServer
int classid = in.readInt();
CdhrObjid ret = gdh.getClassList(classid);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......
......@@ -82,10 +82,10 @@ public class RtUtilities {
int offs1;
int offs2;
// Replace in instance name because mozilla can't pass them as
// Replace in instance name because mozilla can't pass them as
// parameter
for ( int i = 0; i < instance.length(); i++) {
if ( instanceBuff[i] == '' || instanceBuff[i] == '')
if ( instanceBuff[i] == '' || instanceBuff[i] == '')
instanceBuff[i] = '\\';
if ( instanceBuff[i] == '' || instanceBuff[i] == '')
instanceBuff[i] = '/';
......
......@@ -214,11 +214,7 @@ public class FlowFrame extends JFrame implements JopUtilityIfc {
System.out.println( "Menu: " + e.getActionCommand());
if ( e.getActionCommand().equals("Close")) {
for ( int i = 0; i < ctx.cmn.a.size(); i++) {
Object o = ctx.cmn.a.get(i);
engine.remove( o);
session.removeUtility( this);
}
closeFlow();
dispose();
}
if ( e.getActionCommand().equals("Show Crossreferences")) {
......@@ -299,15 +295,19 @@ public class FlowFrame extends JFrame implements JopUtilityIfc {
return null;
}
public void closeFlow() {
for ( int i = 0; i < ctx.cmn.a.size(); i++) {
Object o = ctx.cmn.a.get(i);
engine.remove( o);
}
session.removeUtility( this);
}
// Exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
for ( int i = 0; i < ctx.cmn.a.size(); i++) {
Object o = ctx.cmn.a.get(i);
engine.remove( o);
session.removeUtility( this);
}
closeFlow();
}
}
}
......
......@@ -11,6 +11,8 @@ public class JopOpWindow extends JPanel {
Object root;
public JopOpWindow( JopSession session, Object root) {
// super( BoxLayout.Y_AXIS);
// createGlue();
this.session = session;
this.root = root;
en = session.getEngine();
......@@ -147,11 +149,18 @@ public class JopOpWindow extends JPanel {
boolean scrollbar;
String instance;
public Dimension getPreferredSize() {
return new Dimension( 200, 25);
}
public Dimension getMininumSize() { return getPreferredSize();}
public Dimension getMaximumSize() { return getPreferredSize();}
public OpWindButton( JopSession bsession, String name, String text, int btype) {
this.session = bsession;
this.action = name;
this.type = btype;
setText( text);
setHorizontalTextPosition( SwingConstants.LEFT);
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
switch ( type) {
......
......@@ -38,7 +38,7 @@ public class JopOpWindowFrame extends JFrame {
scrollPane = new JScrollPane(localPanel);
contentPane.add(scrollPane, BorderLayout.CENTER);
contentPane.setOpaque(true);
localPanel.setLayout(new BoxLayout( localPanel, BoxLayout.Y_AXIS));
localPanel.setLayout( new BoxLayout( localPanel, BoxLayout.Y_AXIS));
localPanel.setOpaque(true);
localPanel.setBackground( Color.white);
this.setTitle("Operator Window");
......@@ -55,3 +55,5 @@ public class JopOpWindowFrame extends JFrame {
}
}
}
......@@ -51,7 +51,7 @@ public class JopSessionRep implements JopSessionIfc {
public void openAlarmList() {
if ( alarmList == null) {
alarmList = new MhFrame();
alarmList = new MhFrame(session);
alarmList.setVisible( true);
}
else {
......
......@@ -25,6 +25,11 @@ import java.awt.event.*;
*/
public class MhFrame extends JFrame
{
JopSession session;
JopEngine engine;
XttTree xttTree;
Object root;
/** Description of the Field */
BorderLayout borderLayout1 = new BorderLayout();
......@@ -54,6 +59,7 @@ public class MhFrame extends JFrame
/** Constructor for the MhClient object */
/*
public MhFrame()
{
addWindowListener(
......@@ -68,7 +74,24 @@ public class MhFrame extends JFrame
this.init();
}
*/
public MhFrame()
{
engine = new JopEngine( 1000, (Object)this);
session = new JopSession( engine, (Object)this);
root = (Object) this;
init();
}
public MhFrame( JopSession session)
{
this.session = session;
engine = session.getEngine();
root = session.getRoot();
init();
}
/** Description of the Method */
public void destroy()
{
......@@ -110,7 +133,7 @@ public class MhFrame extends JFrame
messagePanel.add(labelMessage, BorderLayout.NORTH);
//Logg.logg("MhClient: Fre XttTree-skapande", 6);
this.mhTable = new MhTable(this, false, this.labelMessage);
this.mhTable = new MhTable(root, false, this.labelMessage);
//Logg.logg("MhClient: mhTable-skapande klart", 6);
this.contentPane.add(this.mhTable.splitPane, BorderLayout.CENTER);
......
......@@ -105,7 +105,6 @@ public class MhTable extends JPanel
//Create the scroll pane and add the table to it.
scrollPaneEv = new JScrollPane(eventTable);
scrollPaneEv.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
//scrollPaneEv.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
//Add the scroll pane to this window.
this.initColumnSizes(eventTable, evModel, false);
scrollPaneEv.getViewport().setBackground(Color.white);
......@@ -204,10 +203,15 @@ public class MhTable extends JPanel
{
URL url;
String urlString = "127.0.0.1";
if(root instanceof JApplet)
try
{
url = ((JApplet)root).getCodeBase();
urlString = url.getHost();
if(url != null)
urlString = url.getHost();
}
catch(Exception e)
{
System.out.println(e.toString());
}
if(trace)
{
......
......@@ -33,7 +33,7 @@ public class XttTree extends JPanel
JTextField userValue = new JTextField(25);
/** Description of the Field */
JLabel userValueLabel = new JLabel("Value input: ");
JLabel labelMessage = new JLabel("Jonas Nylund was here");
JLabel labelMessage = new JLabel("Navigator ver 1.0");
Dimension size;
/** Description of the Field */
JTree tree;
......@@ -276,7 +276,7 @@ public class XttTree extends JPanel
//then expand row 0 so we can se the rootlevel in the system
tree.expandRow(0);
tree.setScrollsOnExpand(false);
tree.setScrollsOnExpand(true);
tree.setRootVisible(false);
tree.setShowsRootHandles(true);
tree.setSelectionRow(0);
......@@ -701,6 +701,10 @@ public class XttTree extends JPanel
String str = this.gdh.objidToName(objid, Cdh.mName_pathStrict).str;
if(str != null)
this.find(str);
TreePath selectedPath = this.tree.getSelectionPath();
System.out.println(selectedPath);
if(selectedPath != null)
this.tree.scrollPathToVisible(selectedPath);
}
public void find(String userStr)
......@@ -793,11 +797,11 @@ public class XttTree extends JPanel
System.out.println("Hittat skvg");
TreePath tp = new TreePath(tn.getPath());
if(tn.isLeaf())
{
addObjectInfo(tp);
}
else
// if(tn.isLeaf())
// {
// addObjectInfo(tp);
// }
// else
this.tree.expandPath(tp);
this.tree.setSelectionPath(tp);
return tp;
......
......@@ -398,12 +398,13 @@ public class GdhServer
String attrName = in.readUTF();
CdhrBoolean ret = gdh.getObjectInfoBoolean(attrName);
out.writeInt(ret.sts);
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeBoolean(ret.value);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -416,12 +417,13 @@ public class GdhServer
String attrName = in.readUTF();
CdhrInt ret = gdh.getObjectInfoInt(attrName);
out.writeInt(ret.sts);
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.value);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -434,12 +436,13 @@ public class GdhServer
String attrName = in.readUTF();
CdhrFloat ret = gdh.getObjectInfoFloat(attrName);
out.writeInt(ret.sts);
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeFloat(ret.value);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -452,12 +455,13 @@ public class GdhServer
String attrName = in.readUTF();
CdhrString ret = gdh.getObjectInfoString(attrName);
out.writeInt(ret.sts);
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeUTF(ret.str);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -470,13 +474,14 @@ public class GdhServer
String name = in.readUTF();
CdhrObjid ret = gdh.getObjectInfoObjid(name);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -901,13 +906,14 @@ public class GdhServer
PwrtObjid objid = new PwrtObjid(oix, vid);
CdhrObjid ret = gdh.getChild(objid);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -922,13 +928,14 @@ public class GdhServer
PwrtObjid objid = new PwrtObjid(oix, vid);
CdhrObjid ret = gdh.getParent(objid);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -943,13 +950,14 @@ public class GdhServer
PwrtObjid objid = new PwrtObjid(oix, vid);
CdhrObjid ret = gdh.getNextSibling(objid);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......@@ -981,13 +989,14 @@ public class GdhServer
int classid = in.readInt();
CdhrObjid ret = gdh.getClassList(classid);
out.writeInt(ret.getSts());
out.flush();
//out.flush();
if(ret.oddSts())
{
out.writeInt(ret.objid.oix);
out.writeInt(ret.objid.vid);
out.flush();
//out.flush();
}
out.flush();
}
catch(IOException e)
{
......
......@@ -82,10 +82,10 @@ public class RtUtilities {
int offs1;
int offs2;
// Replace in instance name because mozilla can't pass them as
// Replace in instance name because mozilla can't pass them as
// parameter
for ( int i = 0; i < instance.length(); i++) {
if ( instanceBuff[i] == '' || instanceBuff[i] == '')
if ( instanceBuff[i] == '' || instanceBuff[i] == '')
instanceBuff[i] = '\\';
if ( instanceBuff[i] == '' || instanceBuff[i] == '')
instanceBuff[i] = '/';
......
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