Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #15941

Solved (was: Re: how to make Eclipse ignore errors in certain .xml files?)

From Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Newsgroups comp.lang.java.programmer
Subject Solved (was: Re: how to make Eclipse ignore errors in certain .xml files?)
Date 2012-07-11 15:32 +0000
Organization A noiseless patient Spider
Message-ID <slrnjvr74s.u9l.avl@gamma.logic.tuwien.ac.at> (permalink)
References <slrnjvr23s.u9l.avl@gamma.logic.tuwien.ac.at> <jtk1qs$4md$1@dont-email.me>

Show all headers | View raw


Eric Sosman <esosman@ieee-dot-org.invalid> wrote:
> On 7/11/2012 10:06 AM, Andreas Leitgeb wrote:
>> Some project developed in Eclipse needs certain "*.xml"-files
>> for running/testing.  Some of these files are (and really have
>> to be) invalid XML and eclipse flags them red.
>> I'd like to tell eclipse to treat certain handpicked xml-files
>> as opaque files and to not even attempt to validate them any way.
>> There are also *other* xml-files in the project that I still want
>> to have validated and eventually red-flagged. These however are
>> in different folders than the "bad" ones, in case it matters...
>> I've tried googling for: eclipse xml errors ignore validate
>> (and subsets thereof) but couldn't find a relevant one among
>> the results, yet.
>      Have you tried giving the bad files a different extension,
> like "foo.bad" instead of "foo.xml"?

Thanks for the response!
No I haven't. I actually thought of it, but it wasn't an option... 
(it would have implied some complication on the build process, that
the coworkers wouldn't have agreed on - they preferred to just
ignore those red flags)

I really just came back to post that I did find a solution
myself.  (well, it was behind one of those google-hits, that I
had previously discarded as irrelevant by the abstract :-} )


For the record: In the Window->Preferences dialog, I pick Validation,
and in the line "XML Validator" I click the triple-dot-button. In the 
Window that pops up, I then click on "Exclude Group", then button "Add
Rule".

I then selected the folder that contained those purposefully bad
xml-files, but I could just as well have selected each file indi-
vidually, or (probably) specified a pattern like "testcase-42.*.xml"
for the files to ignore.

It didn't immediately show any effect, though (even after "OK"ing
all the dialogs up to and including "Preferences"). I then right-
clicked on the folder in the "Project Explorer" pane of eclipse,
and from the context menu I picked Validate.  Only then, the red
flags disappeared.

Nice thing is that (unlike renaming the files) these preferences
only affect me, so the coworkers still see the red flags on those
xml-files in their eclipse...

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

how to make Eclipse ignore errors in certain .xml files? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-11 14:06 +0000
  Re: how to make Eclipse ignore errors in certain .xml files? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-07-11 10:15 -0400
    Solved (was: Re: how to make Eclipse ignore errors in certain .xml files?) Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-11 15:32 +0000
  Re: how to make Eclipse ignore errors in certain .xml files? eric@invalid.com (EricF) - 2012-07-12 03:28 +0000
    Re: how to make Eclipse ignore errors in certain .xml files? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-12 08:00 +0000
      Re: how to make Eclipse ignore errors in certain .xml files? Jason Bailey <Jason.Bailey@sas.com> - 2012-07-12 13:41 -0400
        Re: how to make Eclipse ignore errors in certain .xml files? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-13 16:41 +0000
  Re: how to make Eclipse ignore errors in certain .xml files? Roedy Green <see_website@mindprod.com.invalid> - 2012-07-13 12:11 -0700
    Re: how to make Eclipse ignore errors in certain .xml files? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-13 21:55 +0000

csiph-web