D language, Eclipse, compiling accross project - eclipse

So I picked up learning the D language, and I use Eclipse. The following question may seem naive, and probably apply to others languages as well ... Let's say I'm a small-time developer. Anyway :
I made a few simple projects. One of them (P) contains a class (C) that I'd like to reuse in another project (P'). I could of course copypasta it in P', quick and dirty. Now let's say I wanna go clean and do some "maintain once, reuse many". I'm not even sure what the proper terminology would be, something along the lines of "linking" maybe ? I learned that in college in the last century, IDEs were sci-fi back then ...
Question : how do I tell Eclipse "Please compile project P' taking into account the source file C.d that is located in the folder for project P" ?

you may just be able to say this project depends on that other project in properties
otherwise you add the source folder of P (where the C.d is) to the include path of project P' and add the correct binary path and library in P to the libpath of P'
you then tell eclipse to compile a library from P which will get placed in the bin folder in P

Related

Algorithms & Technology For Finding Language Server Problems in XML

There is an issue that seems trivial but fascinating to me and I want to learn. I am developing software on Apache Maven and it contains a configuration file named pom.xml. Whenever I add an erroneous entry as such: < john>3.2.0 </ jack > .
It gives two errors. These are as such:
Non-parseable POM C:\Users\username\path\to\application\pom.xml: end
tag name </ jack > must match start tag name < john> from line 32
and
The element type "john" must be terminated by the matching end-tag
"". pom.xml /anket line 32 Language Servers
The point that I want to learn is which tool (eclipse, maven, whatsoever ) detect this anomaly and which technology or algorithm it uses to detect it? It is XML data, so I assume that neither JRE nor JDK can find out this anomaly. Assume that I want to write software that detects such anomalies, how can I do this?

Best way to compare projects on Enterprise Architect

I want to know if there is a way to see the changes I made it to a linked files when I compare a project against a base line or a file to file.
I tried the compare utility from base line and file to file comparassion, and its works, if I add a linked file to x component or edit an existing one, it shows that there is change, but not in the best o most readeable way.
There is another way or tool to acomplished that?
Thank you.
pd_ sorry for my bad english
You can
Write your own comparison engine
Export the comparison xml and use that to present it in a way you like it better
Use LieberLiebers Lemontree

How to find and replace a string in all files of a project using netBeans

I have a PHP project in NetBeans
I have a constant named KEY and I want to change it to SECURE . This constant is spread through out many files of my project. How can I approach this very quickly. I've heard of refactoring, and even tried it but it only renamed the current file and not the whole project's files.
Use Ctrl+Shift+H, after clicked on project folder. Lower in dialog you may specify all needed params. As far as it's a constant, you may prefer to specify case match, or if needed, use regular expressions

Diff merge : view difference between two folders and ignore file version number

I need some help. I have to view difference between two folders, but I need to ignore the file version number (project version number) which is in the header of the file. Like that:
#version Release: $Revision: 9939 $
And do you know the best diff merge software for doing that in Mac OSX and the most beautiful. I know diff merge and Kaleidoscope. I love Kaleidoscope but, it cannot make some difference between two folders.
Many thanks before.
Try going into DiffMerge → Preferences → File Windows → Rulesets. You can modify the existing ruleset for your file type (or add a new one if no ruleset exists already).
Edit the ruleset you're interested in, and go to Lines to Omit. In there you can add a regex to match that line #version.
What I'm having trouble with is getting the folder diff to honor this. I find that files with no diffs according to my rules still end up in the folder diff as a non-match, but when I open the file diff window it says Files are identical or equivalent under the current RuleSet. Not sure if this is a bug or I still have something configured wrong. If I go into Folder Windows → Equivalence Mode and dig into the help there, I think I have all the folder diff properties set correctly to honor my rulesets, but still no luck.
It's a pity you need MacOS. For Win32 there is WinMerge readily configurable via Tools/Filters/Linefilters where you simply enter a regular expression to be ignored.
http://manual.winmerge.org/Filters.html
For example, you might use line filters to ignore comments or certain type of generated code, like version control system timestamps
WinMerge 3 will be Qt based hence MacOS positive too, but current 2.x is not yet.

How do I get the scalaz IDEA live templates working for the symbolic methods?

Many of the methods in scalaz have symbolic unicode equivalents, such as forever and ∞ (of course, I have this the wrong way round, the symbolic methods really have ASCII equivalents).
The project contains a live templates XML file for IDEA so these can be auto-completed, I believe by using the forever+TAB shortcut (in the above instance).
I can't figure out how to import this live template into IDEA and actually use it, though. How can I do that?
Live Templates XML file should be placed under IDEA configuration directory, templates subdirectory.
IDEA configuration folder location would depend on your platform:
Windows: USERPROFILE\.IntelliJIdeaXX\config
Linux: ~/.IntelliJIdeaXX/config
Mac OS X: ~/Library/Preferences/IntelliJIdeaXX
Where XX is IDEA version (90 for IDEA 9.x).
Make sure to close IDEA before copying the XML into the templates directory.