Note that there are some explanatory texts on larger screens.

plurals
  1. POSuppress Eclipse compiler errors in in a plug-in
    primarykey
    data
    text
    <p>I'm currently working on a plug-in for Eclipse that translates some custom Java code (which doesn't necessarily run/compile), to runnable Java code. In particular, the plug-in allows code to be written using classes created or imported during the translation. In general, the pre-translation code runs/compiles fine provided the writer uses <code>import</code> statements at the top of their class files. However, it would be convenient for my users if it was not necessary to import these classes. At the moment, the lack of <code>import</code> statements results in (obvious) compiler errors. Would it be possible to empower my plug-in to either a) suppress/ignore these errors, or b) have Eclipse find these classes automatically, without the use of <code>import</code> statements? I should point out that the translated code would these include the required <code>import</code> statements--but this is not a problem for me. I'm also aware that this could lead to lazy programmers and some bad habits.</p> <p>To clarify, consider the following example of pre-translated code: <code>File f = new File("Somefilename.txt");</code> which clearly requires the possibly imported class <code>File</code>. Without an import statement (<code>import java.io.File;</code>), Eclipse reports that <code>File</code> can not be resolved to a type. This is the error I'd like to hide in files pertaining to projects created for use with my plug-in. (The translated code would include <code>import java.io.File;</code> so that it would be runnable)</p> <p>In closing, I should point out I'm not necessarily looking for code (though I wouldn't be opposed to it), but rather some links to some relevant tutorials (if they exist), or helpful tips/ideas. Also, as this is my first plug-in, it's entirely possible that what I'd like to do is not possible and that I don't realize it--if this is the case, please let me know, preferably with some justification.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload