Astah UML is it possible to generate a nested class diagram? - uml

I'm learning Astah and I would like to reverse-engineer my project into a class diagram.
Let's say I got a folder structure like this
com/
|_ company/
| |_ package1/
| | |_ Class1.java
| | |_ Class2.java
| |_ package2/
| | |_ Class1.java
| | |_ Class2.java
When I import the source code into Astah, the files are imported correctly.
However, when I want to auto generate a diagram for the entire project, it just gets split up in packages like so:
Is there a way to completely generate a uml diagram with nested packages? Preferrably with Astah, if not then please link me a program that can do that.

Related

what are the Best coding practice for creating python package

I am creating pypi python package and for that i tired many solution avilable in different websites.
First of all I followed this Approach1, in this approach author has created class and functions but when tried this one my package gave me an error that no module and class name is not define
I tired many other Approaches like this one Approach2 in this approach author created only functions without class and __init__.py
and then tried this one also which is very common Approach3
and here is important files structure provided by pypi officials
├── LICENSE
├── README.md
├── example_pkg
│ └── __init__.py
├── setup.py
└── tests
I am ready with my package but after spending whole night finding which one is Best coding practice? and now got confused
so my questions are as follows
what is the use of file __init__.py?
best practice for giving directory, class and functions names so that it will help during importing.because according to these answers some people said import directory name, some said filename followed by class etc..
Can anyone provide me proper steps so that i can follow in upcoming packages also
I'd recommend following the Python Packaging Authorities guides and tutorials at https://packaging.python.org.
In addition, the PyPA publishes an example project skeleton that you can use as a starting point: https://github.com/pypa/sampleproject/

Is it possible to hide a dependency that is located inside 'libs' folder in aar?

To give you the context of what I want to accomplish I will describe my project structure first:
Application
|
| - Library Module
| |
| | - Core Library Module
| | Module 1
| |- Jar dependency 1
| |
| | Module 2
| |- Jar dependency 2
Module 1 and 2 where created to contain 2 jar files created by the shadow gradle plugin to relocate dagger 2 dependencies. This is done because the application uses Dagger 1 and they cannot be used at same time in regular bases.
Core library Module contains the core functionality for different libraries and that is why is a separate library, it also uses dagger 2 for Dependency injection.
Library Module contains the functionality we offer to the applications from our clients it also uses dagger 2 for dependency injection.
Now the real problem is the application because it uses Dagger 1 for dependency injection. So with the shadowed jars it it possible to use dagger 1 and 2 in the same project because shadow renames and relocates all the classes that dagger 2 uses to for example #Inject to #Inject2.
In the libraries everything works as expected because I use the relocated and renamed classes Like #Module2, #Inject2, etc.
but in the application that I use dagger 1 the tags are #Inject, #Module as is normally used in dagger 1. As the dependency imported in my build.gradle is Dagger1. But when I build the application I get and error indication that I also have to add the modified Dagger 2 tags like #Module2, #Inject2. And That is exactly what I dont want.
Is there any way to hide or ignore those dependencies using gradle so the application can't see the modified jars for dagger 2 but they can still be used in the libraries?
So far the only solution I have is to remove Dagger 2 from the library and implement the dependency injection by myself but that is time consuming and not exactly what I want
Edit:
complete error:
Error:(25, 8) error: com.sample.model.ApplicationModule is listed as a module, but is not annotated with #Module2
Edit 2:
relocate 'javax.inject.Inject', 'javax.inject.Inject2'
relocate 'javax.inject.Named', 'javax.inject.Named2'
relocate 'javax.inject.Provider', 'javax.inject.Provider2'
relocate 'javax.inject.Qualifier', 'javax.inject.Qualifier2'
relocate 'javax.inject.Scope', 'javax.inject.Scope2'
relocate 'javax.inject.Singleton', 'javax.inject.Singleton2'
relocate 'dagger.Lazy', 'dagger.Lazy2'
relocate 'dagger.MembersInjector', 'dagger.MembersInjector2'
relocate 'dagger.Module', 'dagger.Module2'
relocate 'dagger.Provides', 'dagger.Provides2'
relocate 'dagger.Provides$Type', 'dagger.Provides$Type2'
relocate 'dagger.internal', 'dagger.internal2'
relocate 'dagger.producers', 'dagger.producers2'
relocate 'dagger.Component', 'dagger.Component2'
ApplicationModule seems to be a dagger 1 module. The error seems to come from dagger 2. So obviously the dagger 2 annotation processor operates on the non renamed #Component. You need to make sure the processor only operates on dagger 2 components.

export haskell module with different hierarchy

In Haskell, modules name and file name containing the module have to be the same.
The problem is is not only the file name but the includes the all path, so you have (AFAIK) to create a directory structure matching the module hierarchy, which is a bit annoying.
For example, let's say that I'm writing a datatype D in a module M which I think should be in Database.
The module name should be Database.M.T. As my main directory is already called M (the name of the package) I end up with the following directory structure :
M:
|
+-- Database:
|
+-- M:
|
+ A.hs
Is that possible to just do :
M:
|
+ A.hs
And export M as Database.M ?
This isn't possible at present, short of using symlinks or similar to point Database.M to M which would have various problems with portability and version control.
Simon Marlow proposed a new option for GHC to add support for aliases a few months ago: http://www.haskell.org/pipermail/glasgow-haskell-users/2014-April/024920.html
His idea was that you could run ghc with a new variant of the -i option:
ghc -iDatabase.M=M
and then anything in the M folder would be treated as being part of Database.M as you want.
You'd also be able to put the new option in the hs-source-dirs field in .cabal files.
However there were various objections to the proposal so he's withdrawn it for now. The main problems were that it adds complexity and several other tools (e.g. cabal) would also have to be changed to support it.

gradle project dependency on a distributed layout

We have some old projects with Ant builds that are grouped in different directories. We're trying to convert them to gradle builds.
The repo has a structure like the following where let say that all the WebComponent projects depend on DbComponent projects so they are not in hierarchical layout neither in flat layout. I realize that in the longer run we probably want to publish DBComponent projects as artifacts but for the moment I was wondering if we it is possible to create a multi-project build where subprojects are not flat nor hierarchical. include and includeFlat with compile project do not seem to do the trick in this case.
Is this something that can work at all?
|-WebComponents
|
|
|--project1
|
|--project2
|
|--project3
|
|
|-DbComponents
|
|--dbproj1
|
|--dbproj2
Thank you for any suggestion
Gradle can work with any layout; a custom layout just takes a bit more configuration than a hierarchical or flat layout. Anyway, what you have looks very much like a hierarchical layout, just two levels deep. In this case, the easiest solution is to use includes such as include "WebComponents:project1" and project dependencies such as dependencies { compile project(":WebComponents:project1") }.

how to use seprate jni code for edittext use in another jni c project in android

I have created project for edittext using JNI native.My code has compile and run both and display the edittext in emulator.I have another project which are also used jni native.
i want use the code of edittext other project for display edittext in emulator.Please give
me any solution and example.I am new in Android.
Thanks
You can have multiple .so files in one Android app project. The Java code should load both libraries, but not necesserily together. Your Android.mk file will have two include $(BUILD_SHARED_LIBRARY)
Actually, you can keep the jni folder from your edittext project separate, and write in bottom of the new Android.mk the line:
include $(LOCAL_PATH)/../../edittext/jni/Android.mk
The relative path from one Android.mk to the other depends on how you keep the projects on your disk, like this:
MyProjects
|
--- edittext
| |
| ----- jni
| |
| --- Android.mk
|
--- new project
|
----- jni
|
--- Android.mk

Resources