How to create new package in an old package in Myeclipse with tree shape structure - myeclipse

I want to create new package in an old package in Eclipse with tress shape structure like this:
Unit6
Session1
Part1
I managed to create it yesterday, but now it don't work, the structure is like this:
Unit6.Session1.Part1
I've tried some method such as change the "Page Presentation" to "Hierarchical", but it did't work.I'm a fresher of this IDE, please help me out.Thank you!

I know what's going on. It just because I create only one package in the old package "Unit6", so MyEclipse present in "Flat" way by default. When I create the second package in the old package "Unit6", MyEclipse present in "Hierarchical" way which I set. I'm so stupid!

Related

I cannot create directories/folders in Android Studio and Flutter, only packages

As you can see here, the option to create new directories doesn't exist, i can only add new packages.
What I want to do though is create a folder structure like
>Lib
>>Pages
>>>Startpage
>>>Loginpage
>>Helpers
>>>Networkhelper
>>>>Requesthelper
>>>Storagehelper
etc...
which i can't do with packages as i cannot put packages into empty packages and stuff
this worked before, however now when i created a new project, the same way i always did, it didn't work. any ideas on what i can do/what went wrong?
For some reason, lib directory is marked as source root. Its actually doesn't make difference wether shown as package or folder. Its the same thing. But if you want to change it, unmark it.
in your project tree:
project_name -> lib:
right click
mark directory as
unmark as source root
Screenshot
Hope it help.

Databinding-Classes aren't generated any more

I had a working project in Android-Studio, including Databinding. That eleminates some possible sources of error. ;-)
Then I decided to get my feet wet with Kotlin and began to migrate some classes from Java to Kotlin.
Unfortunately I also klicked to update Android-Studio to 3.4 in the middle of this process. So now I have many moving parts ...
Now after some editing, when I try to compile my app, the databinding-classes are not generated any more. Usually this is a problem of missing getters or setters or something like this. But currently I have no compiler errors that indicate such problems. Only all the references to my BR. class are red as this class is not generated.
In the layout-files the getters and setters from the data-variable are not shown - so there is a problem already there.
The build-log tells me to check the log for details, but I can not find any log with error-messages that could lead to a solution.
Android-Studio 3.4, mixed Java/Kotlin sourcecode
Besides those missing BR class, I have no other compilation errors at the moment.
I checked the raw gradle output and also tried to run those steps with the more verbose output - no luck.
Maybe this is related:
- I also have problems to edit my existing layouts with constraint-views. Somehow the constraints are read-only.
After some fiddeling around I managed to get one layout back to read-write mode. Not shure what I did to accomplish this ...
- Also I have the problem that Android-Studio "remembers" the last project and mixes the configurations from the last project with that of the current one. To fix this I have to delete the .idea folder in the project ... After that I can work with my project until I change to another or open a second one in parallel ... :-/
In order to get logs I also changed to generate the binding-classes by the compiler instead on the fly by Android-Studio - no luck.
As this is an installation with some history, I also tried to delete the configuration-files from Android-Studio - also no luck.
Clean- and Rebuild Project, Restart Android-Studio, Invalidate Caches ... all that tried without success.
Currently I am out of ideas where to look. Maybe somebody out there has a tip for me?
if you use imports in xml like
<import type="java.lang.Integer"/>
you have to delete it because android studio is imported automatically.
ref :
Just as in managed code, java.lang.* is imported automatically.
Finally I found the source of my problems!
After many attempts to find an error in my code or maybe in Android-Studio (also downgraded to 3.3 and tried the current 3.5 canary version) I decided to strip down the code to the max.
So I created a new project. In that project I created 2 observable classes and copied the minimal code from https://developer.android.com/topic/libraries/data-binding/observability#observable_objects.
I created one class in java and one class in Kotlin (with an index-Number at the properties so that I could see which properties are generated in the BR class).
Only the properties from the Java-class were generated in the BR class, those from the Kotlin class were missing. No error messages besides the missing BR-properties were generated. :-(
With this information I started a new research and finally found, that for Kotlin currently the apply plugin: 'kotlin-kapt' was missing in the project build.gradle file.
Once I added this, also the properties from the Kotlin class were added to the BR class.
Some (older) articles also add kapt "com.android.databinding:compiler:x.x.x" to the dependencies, but with the latest compiler I got null-pointer exceptions. Seems that this component is already referenced somewhere else, because it is not necessary (any more).
I also added this to my other project and now those BR-properties are also present there. So I am confident to have found the answer to my question and can now focus on bugfixing my app.

Creating a modular component library package for NPM

I'm currently creating an npm package that will consist of a series of React components that are common to some applications I am maintaining.
My intention is to be able to import this components individually as needed, not all at once. So for instance if I have the components Accordion, DropDown and Widget, but I'm only using one of them, I'd like for only its code to be required.
My understanding is that I would need to be able to do something like
import Widget from 'components/Widget';
Instead of
import {Widget} from 'components';
But I can't get the first version to work. I have not published this package, so I'm using npm link to test it on another application. I'm not even sure what to Google to solve the problem myself, so I'd also appreciate links to relevant documentation on this matter.
Thanks.
So, of course a few minutes after asking my question I resolved the issue:
First, as Yacine Filali commented on my question above, I need to have individual files in order for this to work (this part I had already figured out).
However, I was incorrectly assuming that the root of my package was going to be set to whichever directory my entry file was in. So in package.json I had set
"main": "./lib/index.js"
Incorrectly assuming that the folder structure would be read from there. After altering my configuration to build everything into the root directory it worked perfectly.
(Of course, I'm now working on a better alternative, like generating a package.json for the lib folder)
In your component:
export default Widget
In your index:
export { default as Component } from './Component'

ActionBarSherlock conflicts with Appcompat

I am trying to do a small test project using ActionBarSherlock library but having the same issue as in this post -> android-support-v7-appcompat has same attrs as actionbarsherlock library
Ref: http://pastebin.com/ERDHsQbe
Has anyone found a solution yet?
Thanks.
remove support-v7-appcompat library from your project, its in build with sherlock .
Then in the styles.xml change parent="Theme.AppCompat.Light" to
parent="android:Theme.Light" .This will be sufficient .
If you are gettin any errors related to android-support-v4 , try and copy the latest android-support-v4 into the Sherlock library folder in your workspace.
I have the same problem since I changed attributes in attr.xml file which is identical to another attributes in support-v7-appcompat library
and changing every thing related to it in the actionbarshelock project manually
I lost much of time but finally I did it
replace your ActionBarSherlock library by this one
https://drive.google.com/file/d/0B-XiEeIClMuTb2t3S0h0d2lsUUE/view?usp=sharing
the only change is in the attr.xml file and it's reflection on the java code and layouts
note : you must be sure that you have only one android-support-v4 library file to avoid jar mismatch

Renaming a Mac OS X App

I want to rename the app I'm working on. I have changed the Bundle Name to the new name and I've also renamed the whole Xcode project. But for some reason the the .app file has the original name. Is there something I'm missing?
Thank you in advance! :)
Have you checked the Product Name under Packaging in Build Settings for the target?
By default it is set to the target name, but you can set it to what you want.
You may need to manually edit various items in the menus in MainMenu.xib, too.
Try cleaning and rebuilding the project. But also make sure the CFBundleDisplayName isn't set to the old name in Info.plist. You might also try searching your build settings for the name just to make sure.

Resources