- This topic has 19 replies, 3 voices, and was last updated 20 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
John ZoetebierMemberCan MyEclipse perform code completion for an XML document if the DTD is present ?
If this is possible, can the DTD be read over te Internet.
Or do I need a local copy of the DTD file ?
Riyad KallaMember1) Yes code completion with a DTD
2) Yes it can be located over the internet
3) It will ALSO cache a local copy incase your internet connction goes down.So, you’re in luck! 🙂
John ZoetebierMemberThat is what I read on a newsroup of Ecipse.
However I cannot get it to work with fro example XML files of Jasper Reports.
I click in a tag or in the middle of a paramter, then the ussual Ctrl+space, but nothing happens.
Code example below:<?xml version=”1.0″?>
<!DOCTYPE jasperReport PUBLIC “-//JasperReports//DTD Report Design//EN” “http://jasperreports.sourceforge.net/dtds/jasperreport.dtd”><jasperReport
name=”ChartReport”
pageWidth=”595″
pageHeight=”842″
columnWidth=”515″
columnSpacing=”0″
leftMargin=”40″
rightMargin=”40″
topMargin=”50″
bottomMargin=”50″
scriptletClass=”ChartScriptlet”>
<variable name=”ChartImage” class=”java.awt.Image” calculation=”System”/>
<title>
<band height=”742″>
<line>
<reportElement x=”0″ y=”0″ width=”515″ height=”0″/>
</line>
<staticText>
<reportElement x=”0″ y=”10″ width=”515″ height=”30″/>
<textElement textAlignment=”Center” lineSpacing=”Single”>
<font size=”22″/>
</textElement>
<text>Chart Sample</text>
</staticText>
<textField>
<reportElement x=”0″ y=”50″ width=”515″ height=”50″/>
<textElement textAlignment=”Center” lineSpacing=”Single”>
<font size=”12″/>
</textElement>
<textFieldExpression>”This sample uses JFreeChart Version 0.9.2\n” + “Written by David Gilbert (david.gilbert@jrefinery.com) and others.\n” + “(C)opyright 2000-2002, by Simba Management Limited and Contributors.”</textFieldExpression>
</textField>
<image scaleImage=”Clip” hAlign=”Center”>
<reportElement x=”0″ y=”110″ width=”515″ height=”515″/>
<imageExpression class=”java.awt.Image”>$V{ChartImage}</imageExpression>
</image>
</band>
</title>
</jasperReport>
Riyad KallaMemberjohn,
I just copy-pasted this into a new XML file and got code completion. What you can do is make sure your XML files are associated with the MyEclipse XML editor. Right click on your XML file and make sure it is opening with “XML Editor” that looks like a white piece of paper with a blue <x> on it.Also posting your software versions helps us too (if you are using a sufficiently old version of ME you may not have autocomplete. I’m using 2.7RC2)
John ZoetebierMemberConfiguration:
Eclipse V3.0 M4
MyEclipse V 3.6.2
Operating Systems: SuSE Linux 8.2
Application Server: JBoss 3.2.1
Number of Eclipse plugins starting with org.eclipse.pde.*: 14
JDK to launch Eclipse: Sun j2sdk1.4.2
JDK to launch your server: Sun j2sdk1.4.2Somehow I cannot get XML code completion working on the above platform.
I open file with “XML Source Editor”.
It is a white page with blue X icon in title bar
Syntax coloring is working fine, but no code completion, which is quite useful when the DTD is complex like with Jasper Reports.
Riyad KallaMemberjohn,
Is upgrading your installation of MyEclipse to 3.7RC2 an option? I’m not sure what version of MyEclipse added autocomplete to the XML editor, but I know in 2.7/3.7 it is there.
John ZoetebierMemberCould not find 3.7RC2 on download page, only 2.7RC2.
The latter will probably only work with Eclipse 2 , right ?
I can use Eclipse 2 if this solves the XML problem.
Eclipse 3 M6 is not an option on Linux SWT/GTK : editing is way too slow.
So either Eclipse 2 or Eclipse 3 M4.
Scott AndersonParticipantJohn,
The 3.7 RC2 download is in the folder marked ‘Registered Members Area’ in the download section since it’s not available for free trial users. Please bear in mind that it only works with Eclipse 3.0M6 so it doesn’t appear to be an option for you right now. In addition, when we release 3.7 GA in a couple of weeks, it will most likely work only on 3.0M7, depending on when the Eclipse team releases it.
John ZoetebierMemberI have made a clean install of:
Eclipse 2.1.2 GTK for Linux
MyClipse2.7RC2 : EnterpriseWorkbenchInstaller_020700RC2.binXML code completion still not working.
Both navigator and editor show blue “X” icon.
My Eclipse HTML code completion is working correctly.
There is one thing I noticed though:
HTML file open with says: “MyEclipse HTML Editor”
XML file open with says: “XML Editor”Is this a non MyEclipse XML editor ?
Riyad KallaMemberThis is correct, the name for the XML editor wasn’t updated in time to include the “MyEclipse” part although it seems it should be.
Do you have any other XML editor plugins installed, especially XMen or XMLBuddy? ME makes use of a highly customized version of the XMen plugin, so if you have it installed in addition to ME you might run into conflicts.
I know you mentioned that this was a fresh install however which makes me doubt you DO have any other plugins installed. Are you behind a firewall or proxy? People have had problems with the XML editor pulling the DTD when in this situation, so autocomplete hadn’t worked…
John ZoetebierMemberThere is a problem somewhere with my router.
When I connect directly to the Internet with a dialup modem XML code completeion is working properly.
Leaves the question: which ports do I have to open on the firewall to get XML code completion working ?
Riyad KallaMemberJohn let me check with Scott/Michael on this one.
Scott AndersonParticipantSince the editor simply tries to download using http, as long as http access is provided by the router there shouldn’t be an issue. However, some software firewalls, like ZoneAlarm for example, will disallow internet access to applications unless you explicitly enable it. This sounds like what might be happening to you so it should be simply a process of enabling Eclipse to connect to the internet.
John ZoetebierMemberThere is no firewall running on my Linux PC.
To get to the bottom of this problem I have installed a brand new firewall, called IPCop.
Still the same problem.
However I can surf the web, get email effortless.
IPCop does not limit any traffic coming out of the internal (GREEN) network, so HTTP traffic is not blocked in any way.
To further narrow down the cause of the problem I have installed myEclipse 2.7RC2 on a Windows 2000 workstation.
On Windows XML completion is working properly.
This proofs that the problem is not in the firewall, because the Windows box is working properly.
As my Linux box has unrestricted Internet access, this canot be the problem either.This leaves me to conclude that there must be something speific to the XML plugin on Linux which makes it not working behind a firewall.
Scott AndersonParticipantThis leaves me to conclude that there must be something speific to the XML plugin on Linux which makes it not working behind a firewall.
Well, I don’t know if we know enough to conclude that. For example, one of our test machines is a Linux box behind a firewall and code completion is working properly on it. Is the failure to complete restricted one type of DTD? For example, can you use the XML wizard to create a sturts config file and then see if completion is working in it? This will be an interesting test since the struts dtd is shipped with MyEclipse so no network access is needed for completion. Also, please be sure the XML editor preferences are configured to use the DTD cache.
-
AuthorPosts