View previous topic :: View next topic |
Author |
Message |
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 08, 2007 9:56 pm Post subject: Usage notes |
|
|
Outline: "hide non-public members"
methods without an explicit decorator are public in D, but are treated as non public by the outline (they are hidden)
D Project -> create a project from existing source/folder
certain subfolders are isolated as individual line items, outside of their parent folder. For example, a Tango project looks ok, except for a 'rogue' io/digest' package that was pulled out and isolated for some reason or other. Also, the 'package' icon is showing on some Tango folders and not others (at the top level). Why is that? |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 08, 2007 10:09 pm Post subject: |
|
|
files .classpath and .project are created in the folder where the source is located, rather than in the project location e.g. project location is in "docs and settings/blah/blah" whereas the project code is sourced in "/d/tango" ... those two files wind up in /d/tango |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 08, 2007 10:51 pm Post subject: |
|
|
project explorer -- after New->D Project->from existing folder
some Tango folders have a "(default package)" inserted, containing the source files. These files have module statements, so ...
How can this be cleaned up?
edit: seems like there's a number of small issues relating to New->D Project->from existing folder ... those problems are not manifested when using a different approach to generating a project, so I guess there's perhaps some tweaks needed in there somewhere?
Can work around this, so it's not critical or anything
Last edited by kris on Wed May 09, 2007 11:21 am; edited 1 time in total |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 08, 2007 10:53 pm Post subject: |
|
|
compiling D
configured an external build tool, and output is rendered in the "console" window. Unfortunately, these do not make it into the "problems" pane, and thus the major benefit of an IDE is lost -- clicking on a build error does not relocate to the source location |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 08, 2007 10:55 pm Post subject: |
|
|
Spell Checking
Enabled in options, but does not seem to be enabled under the covers? This is really, really, useful since we all know programmers cannot spell |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 08, 2007 10:56 pm Post subject: |
|
|
Outline
selecting a method name relocates the source pane correctly, but selecting a ctor does not |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 08, 2007 11:18 pm Post subject: |
|
|
debugging with ddbg
breakpoint cannot locate source file to display. Shows "edit source lookup path" button, which appears to show a reasonable root to locate the module. Clicking on the active breakpoints in the "Breakpoints" pane does find the file correctly and relocates to the breakpoint line, but for some reason the file is not found for a general debugging session. This obviously means that one cannot step through the source.
Oh ... "Breakpoint 0 hit at C:\d\tango\tango\io\Stdout.d:113 0x4020be"
^^ That's an explicit path, and I can't add 'root' to the "source lookup path"
How can this be rectified? |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Wed May 09, 2007 2:06 am Post subject: |
|
|
Quote: | subversion in eclipse does not enable "Team->add to svn:ignore"
For some reason this option is never available, so Subclipse insists on trying to check in .obj files, .exe files, and so on. Is this perhaps something to do with the D Perspective? |
^^ turns out there's some problem with importing existing projects into the workspace, that already checked out from SVN ... starting a new project via the SVN checkout instead appears to resolve these issues |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Wed May 09, 2007 4:02 am Post subject: |
|
|
The 'file' icon in the D Perspective
it has a letter 'd' in bright red ... gotta tell ya, bright red means STOP. This color is used in the real-world for such purposes because it is quite hard to ignore. Thus, when the D file icon is displayed vertically in the Navigator, and horizontally in each of the source-file tabs, it is terribly distracting
Please, please, please change the icon color to something that does not scream LOOK AT ME ? |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Wed May 09, 2007 8:53 pm Post subject: |
|
|
kris wrote: | files .classpath and .project are created in the folder where the source is located, rather than in the project location e.g. project location is in "docs and settings/blah/blah" whereas the project code is sourced in "/d/tango" ... those two files wind up in /d/tango |
.project and .classpath files are always created in the project folder, as far as I know. I think the first path you mention is the workspace location. Can you check where do the same files end up creating a Java Project? |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Thu May 10, 2007 5:21 am Post subject: |
|
|
kris wrote: | project explorer -- after New->D Project->from existing folder
some Tango folders have a "(default package)" inserted, containing the source files. These files have module statements, so ...
How can this be cleaned up? |
If I understand right, if you write "module foo.bar;" foo is a package, bar is the module. So in the project explorer you will see "foo" as a folder. When you write "module bar", there's no package, just the module. For that case de "(default package)" applies. Note that this is a copy of JDT, maybe the name should be other. Does this seems right to you?
The other thing is... can you compile a project with some directory structure that does not match the package. ... . module hierarchy defined in the files? I mean, can you for example have a file "foo.d" with a "module bar;" statement? If so... Is the compiler allowing to compile the file? |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Thu May 10, 2007 11:17 am Post subject: |
|
|
asterite wrote: | kris wrote: | project explorer -- after New->D Project->from existing folder
some Tango folders have a "(default package)" inserted, containing the source files. These files have module statements, so ...
How can this be cleaned up? |
If I understand right, if you write "module foo.bar;" foo is a package, bar is the module. So in the project explorer you will see "foo" as a folder. When you write "module bar", there's no package, just the module. For that case de "(default package)" applies. Note that this is a copy of JDT, maybe the name should be other. Does this seems right to you?
The other thing is... can you compile a project with some directory structure that does not match the package. ... . module hierarchy defined in the files? I mean, can you for example have a file "foo.d" with a "module bar;" statement? If so... Is the compiler allowing to compile the file? |
I used the Tango codebase for test purposes. All files have a "module tango.x.y;" at the top, so there is a common root for all. Somehow, default packages were being generated for what seems like arbitrary choices.
Try it yourself? Install a Tango package somewhere, and use New->D Project->from-existing to build an Eclipse project from that Tango installation. If I use subclipse to get both Tango and create a project (and selecting "use the new->D Project" option during that process), then the results are all good. There seems to be a bug somewhere in there |
|
Back to top |
|
|
phoenix
Joined: 06 Mar 2005 Posts: 68
|
Posted: Fri May 11, 2007 8:20 am Post subject: |
|
|
kris wrote: | The 'file' icon in the D Perspective
it has a letter 'd' in bright red ... gotta tell ya, bright red means STOP. This color is used in the real-world for such purposes because it is quite hard to ignore. Thus, when the D file icon is displayed vertically in the Navigator, and horizontally in each of the source-file tabs, it is terribly distracting
Please, please, please change the icon color to something that does not scream LOOK AT ME ? |
I agree with this. Red, at least bright red, should be reserved for errors in the Eclipse UI. However the color is not (programmatically) chosen. The color is from the icon gif:
http://www.dsource.org/projects/descent/browser/trunk/descent.ui/icons/d.gif
So, if one is willing, this is a task that can be taken by anyone on his own: adapt the current d icons or produce new ones. _________________ Bruno Medeiros |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sun May 13, 2007 7:26 am Post subject: |
|
|
kris wrote: | debugging with ddbg
breakpoint cannot locate source file to display. Shows "edit source lookup path" button, which appears to show a reasonable root to locate the module. Clicking on the active breakpoints in the "Breakpoints" pane does find the file correctly and relocates to the breakpoint line, but for some reason the file is not found for a general debugging session. This obviously means that one cannot step through the source.
Oh ... "Breakpoint 0 hit at C:\d\tango\tango\io\Stdout.d:113 0x4020be"
^^ That's an explicit path, and I can't add 'root' to the "source lookup path"
How can this be rectified? |
I guess you have a project that imports Tango, but that doesn't include tango's source code in it (i.e. only your application code is in the project). This will be fixed in next releases when configuring the includes path of a project: the debugger will look in this paths, too.
As a workaround for now, what you can do is to create a project for Tango, and add it to the source lookup path (in Run -> Debug... -> "your launch configuration name" -> "Source" tab). At least that worked for me when debugging an application that uses DFL.
Please let me know if that worked for you. |
|
Back to top |
|
|
asterite
Joined: 01 Jun 2006 Posts: 235 Location: Buenos Aires, Argentina
|
Posted: Sun May 13, 2007 7:29 am Post subject: |
|
|
kris wrote: | The 'file' icon in the D Perspective
it has a letter 'd' in bright red ... gotta tell ya, bright red means STOP. This color is used in the real-world for such purposes because it is quite hard to ignore. Thus, when the D file icon is displayed vertically in the Navigator, and horizontally in each of the source-file tabs, it is terribly distracting
Please, please, please change the icon color to something that does not scream LOOK AT ME ? |
Ok, I'll change the color to a bluer one... or maybe a darker red, I'll see... do you have any suggestion? |
|
Back to top |
|
|
|