Exclude directory from IntelliSense (only) - visual-studio-code

Is there a generic way to prevent a given set of files from being parsed by IntelliSense modules while it still shows up elsewhere?
For instance, I have a third-party library that provides an AppModel class I can customise. Such class is defined in several places:
The library bundles a template to copy from.
The library includes a usage example.
The library implements the class in a helper tool.
The library defines the class for its test harness.
I implement the class in my app.
My implementation is the only one that gets loaded when the app runs and the only one I care about when I navigate my code or use Go to Symbol yet I need to pick among the 5 definitions every time.
For languages where there isn't a specific setting, the only way to go appears to be files.exclude. But that directive basically makes the file or directory completely disappear from the program. It won't even show up in the Explorer pane. That feature seems designed for source control metadata and similar stuff and I don't think it's entirely convenient for third-party libraries.
Any idea?

Related

What is the difference between package and project in Eclipse?

I don't really understand what the point of having a package is. Every Class is kept in a different file, so what's the point of using different packages in a single project?
An Eclipse project has nothing to do with Java. It is a feature of Eclipse to organize and configure your different projects.
A Java package is a language feature of Java. You can use them to structure your project and control visibility between different classes. This becomes necessary even in relatively small projects, which already might have a few hundred classes. I suggest you look for a basic tutorial on what a Java package is and what it can do. To give you a headstart, here is what the official documentation has to say about the purpose of bundling related classes in a package:
You should bundle these classes and the interface in a package for several reasons, including the following:
You and other programmers can easily determine that these types are related.
You and other programmers know where to find types that can provide graphics-related functions.
The names of your types won't conflict with the type names in other packages because the package creates a new namespace.
You can allow types within the package to have unrestricted access to one another yet still restrict access for types outside the package.
Packages are useful for many things. For example, you could store a set of files that do a given task TASK in a package named task.
Packages are a way for developers to find easily and quickly a file, knowing what the role of the file is.
Whenever your project starts growing, packages are essential.
See this lesson for basic understanding of packages utility.

Fiddler extension and inspectors in same assembly

I'm trying to create a fiddler Inspector2 and IFiddlerExtension in the same assembly. However, I can't get the extension to load if I host the assembly in the /Fiddler2/Inspectors/ folder and the inspector won't load when hosted in the /Fiddler2/Scripts assembly. Alternately, is there a way to manually inject, let's say, the inspector in the OnLoad code in the extension (or vice versa)?
I suspect the answer is no, but does someone know if it is possible to get Fiddler to load both types from the same assembly?
Background:
I'd like to be able to provide an inspector that will provide some visualization of a given response, while an extension hosts a new tab that will configure and provide analysis over the entire set of sessions.
If I need separate assemblies, I will likely need three since I'll have common code factored into a shared assembly and then the two assemblies to be put in different locations. It's a lot of extra work for a small assembly with only a handful of types.
You're correct to note that Fiddler's partitioning of extension types makes it difficult to offer both FiddlerExtensions and Inspectors in a single assembly today.
Technically, there's nothing stopping your Inspector object from manually creating and managing a top-level tab, since the primary point of the IFiddlerExtension interface is to get your code loaded in the first place, and Inspectors are already loaded anyway.
In the future, this could conceivably be problematic as I hope to offer "delay-loaded" extension types, but that feature would almost certainly be opt-in and thus not likely to break you.

Get list of classes from an inherited module programmatically

How do I get the list of classes from an inherited module programmatically?
Let's say I inherit from module com.example.Example, how can I get the classes involved with the module?
In GWT, at run-time, you can't really. When the GWT compiles from your java files into javascript, it obtusifies all the names of methods and variables. The names literally don't exist at run-time.
You would have to create something that runs at compile time, like a generator, that processes a directory when you compile your code. You can google how to do it, but you might want to rethink why you need the class listing, or see if you can move that functionality on to your server side.
There is no tool for doing that except setting log level to TRACE during compile time and see all modules being visited.
You can use as reference this 'GraphDependencies tool' written by Thomas Broyer some time ago and which is pending to review.
You can use the ResourceOracleImpl for getting all resources calling the oracle.getResources() or the oracle.getResourceMap() which groups resources, instead of the oracle.getPathNames() utilised in this class.

Development objects not exposed in a Package Interface are still being visible from outside the package. Why?

I'm trying to learn about Package interfaces and use access.
I have 2 hierarchies of packages
1:
ZAVG_TRAINING-PACKAGE1 containing
...
ZAVG_TRNG_SUBPKG3
2:
ZAVG_TRNGPKG_2_STRUCT_SUBPKG_1 containing
ZAVG_TRAINING_PACKAGE2 containing
ZAVG_TRNGPKG2_SUBKPG_1
In the first hierarchy, all the packages are not main packages.
In the second, the base package is a structure package, the next is a main package and the third is a non-main package.
In ZAVG_TRNG_SUBPKG3 (in the first hierarchy), I have a view ZAVG_V_MARA and a program ZAVG_DELETE_THIS_8. I also have a package interface exposing the program, and no use accesses granted.
My problem is that from a program contained in the package ZAVG_TRNGPKG2_SUBKPG_1 I can access both the objects contained in ZAVG_TRNG_SUBPKG3 with no restrictions.
As far as I see from the documentation, in order for a development object to be visible from packages outside the current package (except the outer package). I should have to add them all to the package interface and also create use accesses for the packages that should be allowed to use that interface.
What am I doing wrong?
As long as you're not planning to build something as complex as, let's say, the Enterprise Core Components, and planning to sell it to hundreds and thousands of anonymous customers who are in the mood of suing you if you change published interfaces, I wouldn't bother with the package access control. I know that doesn't answer your question, but all you'll end up with is a lot of wasted time and no advantages whatsoever. You'll have to tweak the package structure in illogical and really counter-intuitive to get things working.
In your case, there are quite a number of things that could have gone wrong - for example, the system-wide package checking switch might be turned off. Then, you'll have to remember that the checking only ever takes place at design time and never when running the program. Finally, as far as I remember, the check is not performed automatically - you'll have to execute it either manually or using some automated tool.
To manually check the package you can do it from the menu in the ABAP workbench:
Or by right-clicking on the object list:
However, as vwegert said: it is very likely that the package check is just not turned on in your system (I have not worked on a single system that had it turned on).

how to determine dependent library in zend framework?

I completed my very first project in zend framework!! Thanks to stackoverflow community!!
While uploading files, i didn't know how to include zend library so i uploaded the whole library in the /library folder of my project base.
Is there a way to determine which library is used and which in not (like compilation that automatically copies dependent files to library folder incase webhost does not provide zend library ..)? i would be awfully bad to manually add each file and test weather the particular library is added or not.
This answer essentially says don't worry about including the whole library. I usually put the whole library in the project library folder, just like you did.
But if it is truly problematic to include the whole library, you could take a look at Jani Hartikainen's Packageizer which, at least in a previous form that I played with, allowed you to specify the components you needed and it would chase the dependencies and wrap them in a neat little package.
Disk space is cheap. Just have the entire ./Zend library directory (and maybe ./ZendX, if you are using that) into your own library directory where it will used. With autoloading, nothing that isn't being used will take up any significant memory. taking even 5 minutes trying to figure out is time (and therefore money) that is more usefully spent writing code.
I wonder if it would be worthwhile/reliable to subclass the autoloader for this and have it optionally log each class it loads during site operation (sort of how Zend_Translate can log untranslated strings).
You could have it turned off normally but in your testing environment you would turn it on (via your application.ini), and have it build your dependency list while your unit tests are running.