Vincent Semeria | 29 Mar 18:11 2014
Picon

bug in semantic-get-local-variables

Hello,

In the attached file which contains a simple c++ function,
1) run M-x semantic-calculate-scope    to get a context
2) run M-: (semantic-get-local-variables)

It fails to detect the last variable :
    const CSRMarketData& context = fx ? param : contextFx;


Another question not related, I couldn't manage to use semantic with C#. When I open a C# file, (semantic-active-p) returns nil.

Is there some setup to do to activate C# in semantic ?

Thanks,
Vincent
Attachment (bugSemantic.cpp): text/x-c++src, 1341 bytes
------------------------------------------------------------------------------
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Daniel Colascione | 25 Mar 02:49 2014

ede-expand-filename and multiple files

ede-expand-filename takes a file basename and converts it to the full
path of a file in a given project. This interface doesn't make any sense
--- can't a single project have more than one file with a given
basename? Does that mean it's not possible to get away with a
single-project system, and that instead project type creators need to
create a subproject object per directory? I have a project with
thousands of directories. Will users to wade through all of them?

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Daniel Colascione | 18 Mar 02:10 2014

Why project-specific caches?

Why does every project type I've seen maintain its own cache of
projects, usually managed in the implementation of the load-type slot,
instead of just relying on the global one managed by auto.el?

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Tu Do | 17 Mar 09:01 2014
Picon

Fwd: Default configuration for CEDET

Hi,

I think these modes are useful for me in Alexott's setup:

 - global-semanticdb-minor-mode: it's good to have a cache of what already parsed to speed up future sessions.


 - global-semantic-idle-scheduler-mode: it's nice if CEDET always follows my changes.

 - global-semantic-highlight-func-mode: having a special highlight of my first tag (which is usually variable declaration) is good

- (require 'semantic/bovine/c) and (require 'semantic/bovine/clang) and (require 'cedet-files): I think this is required for CEDET working

- (require 'eassist): its function for switching between .h and .cpp is useful. I used to use eassist-list-methods, but I am using helm--semantic-or-imenu these days.

- semantic-complete-analyze-inline: Nice stand-alone completion function. However, with auto-complete, it is less required, also sometimes the there's a lot of completion candidates, it would be better to have a separate buffer to see all the candidates.

- semantic-ia-fast-jump: yes, this is useful. I can jump to tag definition and included files.

- semantic-ia-show-doc: this function is nice if it can correctly parsed the comments of template functions.

- semantic-ia-show-summary: it is always useful to quickly see function interface without going to its declaration in another file. However, this function, like semantic-ia-show-doc, should be updated to list multiple overloaded functions.

Those are the features I frequently used. For key binding, I propose "C-c s" prefix for CEDET; s stands for semantic:

-  "C-c s j" : semantic-ia-fast-jump
-  "C-c s d" : semantic-ia-show-doc
-  "C-c s s": semantic-ia-show-summary
-  "C-c s t": eassist-switch-h-cpp
-  "C-c s a": semantic-analyze-inline
-  "C-c s r": semantic-symref



On Fri, Mar 14, 2014 at 7:10 AM, Eric M. Ludlam <eric <at> siege-engine.com> wrote:
On 03/12/2014 04:00 AM, Tu Do wrote:
CEDET should provide a default configuration. I think many people are
using Alexott's configuration:
https://github.com/alexott/emacs-configs/blob/master/rc/emacs-rc-cedet.el (myself
including), so I hope that it will get incorporated into future CEDET as
well. It should only take a function to setup, and if they want to
further customize (i.e. integration with Ctags, Cscope...) then there
should be a short and simple guide for adding relevant features.

Hi,

I think it would indeed be a good idea to have some canned configurations for CEDET, though I am dependent on others who work on different kinds of code bases to design them.  I use a plain setup myself similar to what is in the cedet.texi doc, and then turn things on and off depending on what I am testing.

I'd love to hear from users on this list what you think a "short-and-sweet" setup looks like, vs other kinds of setup that might be more targeted toward a particular type of use.

I noticed in the example above, there are many keybindings.  I wonder if there is agreement out there what a good set of default keybindings might be.  We could wrap them up into a handy minor-mode, or just extend senator for that job, perhaps removing some lesser/never used features, or even building a new minor mode keyed based on experience from using senator for a long time.

Eric


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Dieter Van Eessen | 16 Mar 14:14 2014
Picon

Adding modeling capabilities to emacs through communication with eclipse

Hello,

I'm writing this message after viewing what emacs can do in the field of modeling using the CEDET Cogre package.

I've stumbled upon the this project during my search for an ideal modeling tool:

I'm convinced that graphical modeling will play a major role in system (hardware, software) and process (business management, workflows) engineering. A picture is worth a thousand words!

I must say that the possibilities for UML/SysML modeling are a bit skinny compared to eclipse. The eclipse/topcased is great thanks to all the plugins being developed at the moment (transformations, cdo, model comparison). I've been testing several of all the features available and I really like them!

BUT eclipse doesnt really fit in the workflow. Currently I'm working as lightweight as possible, using a minimal but pleasant environment:
- ubuntu server
- 'awesome' window manager
- emacs as editor
- conkeror for web browsing
Using a heavy weight application as eclipse doesnt fit in... I've been looking for alternatives with similar functionalities but there simply are none!

What I need is some way for emacs to communicate with the components written for eclipse. Been thinking on using the eclipse plugins as standalone headless RCP apps but I returned from that road after web-search. An alternative solution would be to use eclipse components by communicating through scripts.
Theres an eclipse project running which allows script based communication with all components of the platform. It's called EASE (http://wiki.eclipse.org/E4/Scripting) and I've suggested this use case on their mailing list (eclipse-scripting-dev <at> eclipse.org) as they've been asking to add possible use cases in one of their presentations. Perhaps you could contact them to see if they're intrested in co-development.

I would be great to generate diagrams, transform and compare models by executing scripts in emacs/other external programs and return the output to them:
  -diagrams in an xemacs-buffer or an emacs org-mode latex/html export
  -using the output of modelica model execution (uml models with   modelicaML stereotypes)
  -source code generation for ROS nodes using engines written in eclipse epsilon project.
  -literate programming within emacs org and graphical execution in   presentations.

These could a few possibilities. My MAIN request is simply not having to move back and forth between emacs and eclipse when I attempt integrate models within a project.

The workflow described above is actually only one of the possible implementations of what could be one of the future goals: Using a headless eclipse RCP as middleware for software development components.

The intention would be to shift focus AWAY from all current eclipse based graphical UI. In some sense I'd compare my view to a solution which is already available in robotics software development: the core components of ROS (robotic operating system) handle all communications in a standardized fashion between a very broad and distributed community of robotic software developers.

Eclipse is a component based application, but the core-components are not often used to fulfill non-IDE functionalities.
Having the eclipse core listening as server on port using minimal resources is a start. (network communication is already a requirement within Eclipse Advanced Scripting Environment project). Adding script based communication to create jobs which execute eclipse plugin functionality is great!

Eclipse is a great IDE, perhaps even the greatest when it comes to modeling. But if the user interface could be non-eclipse based, I think you'd attract alot of non-eclipse users.

I've posted a similar message to the eclipse scripting development team (eclipse-scripting-dev <at> eclipse.org) Perhaps this message could initiate communication.

What's your opinion on the subject?
kind regards,

Dieter
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Eric M. Ludlam | 15 Mar 19:36 2014

Re: ede-linux and .config

On 03/12/2014 03:43 AM, Darren Hoo wrote:
> "Eric M. Ludlam"<eric <at> siege-engine.com>  writes:
>
> Hi Eric,
>
> Sorry to bring up this years-old thread again. I full-quoted the mail
> for keeping the context.

Thanks for the reminder.

> 1. How to enable Makefile mode on the config file? The ways I think of are

I will answer this question inline with the patch.

> 2. How can I turn the config file into a Include tag like what #inlclude ...
>     does so that semantic can search in it during parsing?

If the config file is full of macros that are #defined while parsing 
code, then there are two possibilities.

1) EDE can add the config.h file to the list of preprocessor symbol 
files for the project.  I'm assuming configure creates a config.h ?  To 
do this, just load it in, parse it, and extract the 
semantic-lex-spp-macros for you preprocessor symbols.

If not...

2) EDE can derive all the preprocessor symbols, and return them via the 
ede-preprocessor-map method you were patching below.

If there is some other reason to treat the .config file as C code then 
it just needs to be associated with C, probably via auto-mode-alist.

>>>
>>> === modified file 'ede/ede-linux.el'
>>> --- ede/ede-linux.el	2010-05-18 00:42:27 +0000
>>> +++ ede/ede-linux.el	2011-03-20 12:57:45 +0000
>>>  <at>  <at>  -201,6 +201,8  <at>  <at> 
>>>      (let* ((proj (ede-target-parent this))
>>>    	 (root (ede-project-root proj))
>>>    	 (versionfile (ede-expand-filename root "include/linux/version.h"))
>>> +	 (configfile  (expand-file-name ".config" (oref proj :directory )))
>>> +	 (version (oref proj :version))	

In this part, I recommend the whole "parse the config file" be moved 
into a separate function.  That way if it exists, it will be used, and 
if not there will be no errors.

>>> +    ;; in case kernel is not configured, try to figure .config out
>>> +    (unless (file-exists-p configfile)
>>> +      (let* ((uname-r (condition-case nil
>>> +			  (with-temp-buffer
>>> +			    (call-process "uname" nil t nil "-r")
>>> +			    (buffer-substring (point-min) (1- (point-max))))
>>> +			(error nil)))
>>> +	     (pc "/proc/config.gz")
>>> +	     (bc (format "/boot/config-%s" uname-r)))
>>> +	(and uname-r (string-match version uname-r)
>>> +	     (or (and (file-exists-p pc) (setq configfile pc))
>>> +		 (and (file-exists-p bc) (setq configfile bc))))))
>>> +
>>> +    (and (file-exists-p configfile)
>>> +	 (let (configs)
>>> +	   (with-temp-buffer
>>> +	     (insert-file-contents configfile)

Once you have inserted the contents into a temp buffer, call 
(makefile-mode) to force it to use that tag parser.

>>> +	     (goto-char (point-min))
>>> +	     (while (re-search-forward "\\(CONFIG_.*?\\)=\\([my]\\)" nil t)
>>> +	       (push (cons (match-string-no-properties 1)
>>> +			   (match-string-no-properties 2))
>>> +		     configs)))

Once here, you can use semantic-fetch-tags, then 
semantic-find-tags-by-name-regexp, and have all the data you need.

Not that I know what the file format is.  I'm guessing from the email 
that it is compatible with Makefile mode.

If it is common for the .config to change frequently, you may need to 
add a new EDE command to the linux project to flush all the semanticdb 
databases associated with the project.  That is the only way to account 
for changes to the macro values.

I hope this helps.
Eric

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Tu Do | 12 Mar 09:00 2014
Picon

Default configuration for CEDET

CEDET should provide a default configuration. I think many people are using Alexott's configuration: https://github.com/alexott/emacs-configs/blob/master/rc/emacs-rc-cedet.el (myself including), so I hope that it will get incorporated into future CEDET as well. It should only take a function to setup, and if they want to further customize (i.e. integration with Ctags, Cscope...) then there should be a short and simple guide for adding relevant features.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Darren Hoo | 11 Mar 07:53 2014
Picon

another problem with spp


try semantic-lex-debug on the following line

    #define a (1)/**/

the output is

    ((spp-macro-def 9 . 10)
     (close-paren 13 . 14))

try compare this with

   #define a (1) /**/

this one outputs

   ((spp-macro-def 9 . 10))

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Alastair Rankine | 9 Mar 21:38 2014
Picon

semantic-clang-get-system-includes

Running on MacOS X 10.9.2 with developer tools installed, semantic-clang-get-system-includes fails to detect the system includes, and returns nil.

In order to diagnose the problem I changed the function to use (with-current-buffer (get-buffer-create "*clang*")...) instead of (with-temp-buffer ...). Here is the contents of the *clang* buffer after running that function:

Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "x86_64-apple-macosx10.9.0" "-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-mdisable-fp-elim" "-masm-verbose" "-munwind-tables" "-target-cpu" "core2" "-target-linker-version" "224.1" "-coverage-file" "/dev/null" "-resource-dir" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0" "-stdlib=libc++" "-fdeprecated-macro" "-ferror-limit" "19" "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-10.9.0" "-fobjc-dispatch-method=mixed" "-fobjc-default-synthesize-properties" "-fencode-extended-block-signature" "-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-o" "/dev/null" "-x" "c++" "-"

semantic-clang-get-system-includes looks for arguments of the form "-internal-\\(externc-\\)?isystem", which are obviously not there. Maybe these arguments have gone away in recent Clang versions?

Anyway, it looks like the right way to analyze the system includes is to pass -v to the frontend. According to the Clang FAQ, this can be done as follows:

clang -x c++ -Xclang -v -c - 
clang -cc1 version 5.0 based upon LLVM 3.3svn default target x86_64-apple-darwin13.1.0
ignoring nonexistent directory "/usr/include/c++/v1"
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.


Here we can see the system include paths, which can be extracted fairly simply. Note that this command expects input on stdin, so if you run it from the command line you have to type ^D to get it to terminate.

Probably we need to incorporate this output into a unit test for semantic-clang - similar to that for semantic-gcc. I also have access to several other Clang installations to provide other test output strings.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Alastair Rankine | 9 Mar 21:44 2014
Picon

semantic-clang-get-system-includes

Running on MacOS X 10.9.2 with developer tools installed, semantic-clang-get-system-includes fails to detect the system includes, and returns nil.

In order to diagnose the problem I changed the function to use (with-current-buffer (get-buffer-create "*clang*")...) instead of (with-temp-buffer ...). Here is the contents of the *clang* buffer after running that function:

Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "x86_64-apple-macosx10.9.0" "-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-mdisable-fp-elim" "-masm-verbose" "-munwind-tables" "-target-cpu" "core2" "-target-linker-version" "224.1" "-coverage-file" "/dev/null" "-resource-dir" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0" "-stdlib=libc++" "-fdeprecated-macro" "-ferror-limit" "19" "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-10.9.0" "-fobjc-dispatch-method=mixed" "-fobjc-default-synthesize-properties" "-fencode-extended-block-signature" "-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-o" "/dev/null" "-x" "c++" "-"

semantic-clang-get-system-includes looks for arguments of the form "-internal-\\(externc-\\)?isystem", which are obviously not there. Maybe these arguments have gone away in recent Clang versions?

Anyway, it looks like the right way to analyze the system includes is to pass -v to the frontend. According to the Clang FAQ, this can be done as follows:

clang -x c++ -Xclang -v -c - 
clang -cc1 version 5.0 based upon LLVM 3.3svn default target x86_64-apple-darwin13.1.0
ignoring nonexistent directory "/usr/include/c++/v1"
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.


Here we can see the system include paths, which can be extracted fairly simply. Note that this command expects input on stdin, so if you run it from the command line you have to type ^D to get it to terminate.

Probably we need to incorporate this output into a unit test for semantic-clang - similar to that for semantic-gcc. I also have access to several other Clang installations to provide other test output strings.

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel
Alastair Rankine | 6 Mar 05:28 2014
Picon

EDE-compdb now available through MELPA

Folks,

Just to let you know that I've submitted EDE-compdb as a package to MELPA, so now you can easily install it and
give it a try.

(To refresh your memory about EDE-compdb go here: https://github.com/randomphrase/ede-compdb)

In other news, I am currently drafting a guide on how to set up a C++ development environment based on Emacs,
CEDET and other tools like EDE-compdb. I hope to show how these tools fit together and provide a rich set of
productivity features. For example, I describe how to configure Flymake mode and use auto-complete for
header files.

Early draft is here: https://github.com/randomphrase/dotfiles/wiki/Creating-a-C---Development-Environment

Comments appreciated.

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Cedet-devel mailing list
Cedet-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel

Gmane