Home » Newcomers » Newcomers » Reported Errors -- Why Are These Here?
Reported Errors -- Why Are These Here? [message #124663] |
Sun, 18 December 2005 21:19  |
Eclipse User |
|
|
|
Originally posted by: hal.thresholddigital.com
I'm trying to learn Eclipse. I'm self-taught, and had been programming for
several years before I had even heard of an IDE. For me, an IDE was Kate,
on KDE (Linux), where I had one window with a text editor, file list, and
console all in one. I'm trying to get used to the idea of all the extra
tools in one place (until now all my debugging was done with extra print
statements -- in whatever language). So I'm having a hard time getting
used to Eclipse.
I tried importing a project I've been using successfully under Java 1.4.2
for a while, with no compile problems or other problems. Eclipse is not
only reporting errors, but some of the errors don't make sense to me --
they seem either completely wrong or out of place. I've included 2
sections of code, stripped of most comments so my new comments, indicating
the errors, are obvious. I think these snippets should be enough. If not,
I can post more.
I'm using the book "Eclipse 3.0 Kick Start by Carlos Valcarcel and making my
way through it, but I need to get to at least a basic functional level
quickly.
I basically want to understand why I'm getting these errors because, from
what I've learned, I should not be getting these problems and one of them
seems completely inappropriate for the line it is on (and probably wrong
all together).
Thanks for any insight!
Hal
------------------------------------------------------------ --------------
/**
Program: LDNet Client Letter Printer
Classes: LDOOo
Author : Hal Vaughan
Company: Threshold Digital, Ltd.
Interface to OpenOffice to allow for printing files.
*/
import java.util.*;
import java.io.*;
import java.lang.Thread;
import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.uno.XComponentContext;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
import com.sun.star.util.*;
import com.sun.star.view.*;
import com.sun.star.frame.*;
import com.sun.star.lang.*;
import com.sun.star.text.*;
import com.sun.star.document.*;
//import com.sun.star.*;
//import com.sun.star.awt.*;
public class LDOOo {
boolean OOoWorking;
boolean bAltered = false;
int docLimit = 10;
//Eclipse marks the next line with an X in a solid, red circle and
//says, "The type LDOOo is already defined"
int docFree = 0;
int iSleep = 15;
long loadLimit = 5; //Mins to allow for loading OOo
String sSep = System.getProperty("line.separator");
String sMode = "API";
String sConnect =
"uno:socket,host=localhost,port=<port>;urp;StarOffice.ServiceManager ";
String[] docList = new String[] {"", "", "", "", "", "", "", "", "", ""};
HashMap docHash = new HashMap();
LDConfig sysConfig;
LDFile sysFile;
XComponentContext oComponentContext;
XComponentLoader oLoader;
XMultiServiceFactory oSmgr;
XPrintableListener oPrintListener;
XComponent[] oDoc = new XComponent[docLimit];
PrintChanger pChanger;
public LDOOo(LDConfig ldc, String sType) {
sysConfig = ldc;
sysFile = new LDFile(sysConfig);
if (sType.toLowerCase().indexOf("interface") >= 0) {
makeAPI();
} else if (sType.toLowerCase().indexOf("command") >= 0) {
makeCommand();
}
pChanger = new PrintChanger(sysConfig);
}
//Even with this here, it seems ignored. LDConfig is a setting
//and info class for tracking config systems.
public LDOOo(LDConfig ldc) {
sysConfig = ldc;
sysFile = new LDFile(sysConfig);
String sType = sysConfig.getMode("printmethod");
if (sType.toLowerCase().indexOf("interface") >= 0) {
makeAPI();
} else if (sType.toLowerCase().indexOf("command") >= 0) {
makeCommand();
}
pChanger = new PrintChanger(sysConfig);
}
//This class contains other functions, but they don't seem related to these
//errors.
------------------------Next Class---------------------------
/**
Program: LDNet Client Letter Printer
Classes: LDConfig
Author : Hal Vaughan
Company: Threshold Digital, Ltd.
LDNet main class
*/
import java.util.*;
import java.io.*;
public class LDNet {
LDConfig sysConfig;
LDOOo myOOo;
LDAgent myAgent;
LDMail myMail;
LDMerge myMerge;
LDReport myReport;
LDExtend myExtend;
LDZFilter myFilter;
public static void main(String[] args) {
LDNet ldn = new LDNet(args);
ldn.process(args);
return;
}
public LDNet(String[] args) {
sysConfig = new LDConfig(args);
sysConfig.setMode("runnable", "true");
sysConfig.log("start", "LDNet system");
//Eclipse marks the next line with a lightbulb and X in a red square box
//and reports the error "The constructor LDOOo(LDConfig) is undefined"
myOOo = new LDOOo(sysConfig);
sysConfig.setOOo(myOOo);
myAgent = new LDAgent(sysConfig, myOOo);
myMail = new LDMail(sysConfig);
myMerge = new LDMerge(sysConfig, myOOo);
myReport = new LDReport(sysConfig);
myExtend = new LDExtend(sysConfig);
myFilter = new LDZFilter(sysConfig);
if (!myOOo.isWorking()) {
sysConfig.log("fatal error", "OOo reported as not working.");
}
return;
}
|
|
| | |
Re: Reported Errors -- Why Are These Here? [message #125024 is a reply to message #124749] |
Tue, 20 December 2005 10:53  |
Eclipse User |
|
|
|
Originally posted by: charlest.otii.com
Hal Vaughan wrote:
> I feel like a cross between a kid on Christmas morning and the country
> cousin who comes into the big city for the first time. Having a program do
> a lot of the drudge work is amazing, but it will take me a while to get
> used to just how powerful it is.
>
I know how you feel. I felt the same way when I first started using
Eclipse, it was the first IDE that I really liked. I've been using it
for two years now and I find there is always something new to learn
about it. Good luck.
charlie
|
|
|
Goto Forum:
Current Time: Sun Jul 20 23:38:20 EDT 2025
Powered by FUDForum. Page generated in 0.11886 seconds
|