Flashbuilder 4.7 Not linking or indexing folders in a linked source path - flash-builder

So recently switched machines to a MacBook Air, OSX 10.9.2
Pulled down the project I was working on into a fresh install of Flashbuilder, with AIRSDK version 13
All settings match with other functioning setups from other team members but for some reason for me the project is not linking or indexing folders in a linked source path.
The specific issue is that when in a non-linked source folder, everything works fine, but when editing a file that lies within a linked source folder the programme won't open declarations, content assist doesn't work, etc.
so:
src |
-> File.as
linked_folder | src |
-> OtherFile.as
Everything from File.as works 100%, so it can see, interact with, and reference OtherFile.as (with autocompletion, and the rest), as well as all the other files in the linked_folder, and the other linked folders.
From OtherFile.as, when opened in FlashBuilder, it doesn't seem to even open as an as file. When you open the autocompletion (Ctrl + Space), it shows none of the normal suggestion windows, no "Templates", no "Variables", no "Classes and Interfaces", or anything else. It just shows an empty suggestion window, with no alternatives.
Have tried everything I can think of, but have never seen this before.
Any ideas?

Just incase someone else has this same problem I figured I'd answer my own question.
T'was a rogue capitalization in my project path.
Basically instead of cloning the project into developer/repos/git/myprojectname I had cloned it to developer/repos/git/Myprojectname
Drove me crazy, but that was the problem.

Related

How to add resource files in intellij from src/main/java directory(intellij 2016)

I am trying to get this very small project working in intellij(it already works in eclipse). https://github.com/deanhiller/webpiecesExample which is generated from the webpieces webserver project. When booting the server, it can't find the html files in src/main/java(ie. the html files are there rather than src/main/resources to keep locality with their controllers).
I tried adding java:.html and java:.tag as I thought that would work according to this document
https://www.jetbrains.com/help/idea/2016.2/compiler.html
but that doesn't seem to work. I then also found cmd-; opens a window with resources and you can click on directories to mark them as resource directories. I tried doing that but it won't let me do that on a source directory.
Both gradle and eclipse are all working with this project, but I can't seem to get intellij working. It would be very nice to be able to use intellij on this project.
EDIT: Why put some resources in src/main/java instead of src/main/resources...
It can be very annoying to have to create the same package heirarchy in two directories(and slower as you are doing double the work). Also, you miss the view of controller's relationships to html files. Lastly, some files are referenced like ../example/index.html from the controller and literally it makes more sense to the user then if they are in the same tree. If you did ../../../../src/main/resource/com/buffalo/example/index.html, it actually would not even work as it is a relative classpath reference. After working in both environments, we found the one to be more efficient so even though it flies in the face of best practices, it makes developers faster(so best practices vs. developer speed.....I choose speed personally). BUT NOTE: This is not true on all projects. Most project should stick to src/main/java and src/main/resources.
thanks,
Dean

Intellij project opening directory above project

I feel kind of silly asking this but I've been poking around and I don't know what is causing it. I have a directory structure that has a number of projects in it, it looks like this:
projects_root/project1
projects_root/project2
projects_root/project3
When I open any of these projects with Intellij it instead opens up the projects_root directory, so that all the projects in the directory are opened under my project tab. This is annoying as it clutters up my project view and it's causing some issues with my debug configurations etc. The strange thing is this was working fine until yesterday, that is opening project1 would open at the root of project1 instead of projects_root. I've changed no settings, the behaviour seemed to just start out of the blue. Has anyone seen behaviour like this before? Could anyone recommend a fix for this?
It appears that the content root of your IntelliJ project is incorrect. I can't tell you the cause for why this happened but you should be able to fix the content roots without needing to recreate each of the projects.
For each project, open up the respective IntelliJ project and follow the steps for removing a content root for all of the non-applicable content. E.g., for project1 remove projects_root/project2 and projects_root/project3.

Dart packages problems with intellij IDEA

I'm actually trying to use Dart in IntelliJ IDEA, and I have successfully install the plugin for it, but I face numerous others problems.
But the problem I want to resolve the most, is the fact that for some packages, IntelliJ doesn't show the sources inside it and not with particular reason...
The whole project work in Dart Editor, and launch correctly, so the problem is not from pubspec.yaml.
To makes me more understandable, I will say that I "pub get" correctly the packages A and B, so they appear as folder link in IntelliJ :
http://imgur.com/rb0ZSVA
But like you see, I cannot enter in the b package to see the files inside it. I have checked the structure of the two folders without noticing any difference.
The more ridiculous in that is, I can see some of the files inside the B package in the editor of IntelliJ via Ctrl+Click in the dart files that import the files inside the B package. And it doesn't work for all of them ...
'b' is a 'path package' in your project. That means that b original source code is located on your computer and you specified path to it in pubspec.yaml. IntelliJ IDEA excludes all copies and leaves only original files in project. Root 'packages' folder is not excluded, but all its copies (for example in web folder) are excluded. packages/b is a copy and it is excluded. To work normally with source files from b package you should add path to b as a separate content root: Project Structure | Modules | your Dart module | Add content root.
In IntelliJ IDEA 14 excluded folders are visible by default. Use cases when you need to see excluded folder contents are rare so you may safely hide them (the option is under the gear in the Project View tool window title). With it you will see empty node in packages/b with a hint that it is just a link to b/lib folder. And anyway you should have path to b configured as a content root.
You should not open files of projects currently open in IntelliJ from the package folder but instead directly from the project. The b/lib after the folder icon indicates that this package is part of your currently opened IntelliJ project (may added as a Resource Root)
When you navigate to a referenced file ctrl+click the file is not opened from the packages symlink but from the package in your IntelliJ project (as you should do it manually as well).
The solution is to update IntelliJ to the Early Access update (139.2).
So this question will be useless in the next update, I will delete her at that moment.

iOS UI Test Project 'MailCore/MailCore.h' file not found

I did a
git clone https://github.com/MailCore/mailcore2.git
I open the
iOS UI Test.xcodeproj
I run the Build
I get the error
'MailCore/MailCore.h' file not found
I cannot understand why that is happening.
What should I do to get this to build?
Some other sources I have found and followed their instructions are below. None of which fixed this problem.
https://github.com/MailCore/mailcore2/issues/316
https://github.com/MailCore/MailCore/issues/19
https://github.com/MailCore/mailcore2/issues/276
I also was able to open the
mailcore2.xcodeproj
and successfully build each of the targets. Which is interesting that I can do that but cannot build the test project independently.
I also followed the video and read me instructions to add to an existing project and was able to build until I added the
#import <MailCore/MailCore.h>
to one of my files.
UPDATE:
The above process I initiated on my iMac.
On my MacBook Pro after I cloned mailcore2 I opened
mailcore2.xcodeproj
first then did the build on each of the targets.
Then I closed that project.
Opened the iOS UI Test.xcodeproj and did a build on that.
This was successful.
However, I still want to know what would cause the problem with the "file not found"
UPDATE 2:
I removed to trash all mailcore2 code from my iMac.
I created different locations in Finder for doing another clone of mailcore2.
I did the git clone.
I opened mailcore2.xcodeproj
I followed the exact same process of building each target like I did on my MacBook
I then opened the iOS UI Test.xcodeproj and did a build.
I get the same problem of
'MailCore/MailCore.h' file not found
Makes no sense to me how it works on macbook but not on iMac.
You can add in target dependency static mailcore ios(mailcore2).
and add the framework libmailcore-ios.a
Its working.
What I finally did was drop mailcore2 into an existing app I already had started.
To do this I did the following:
I removed all traces of mailcore2
I again followed the instructions in the README and the video help.
This time I followed some instructions from
https://github.com/MailCore/mailcore2/issues/276
The instructions in that link says to add the following to Library Search Path:
$(PROJECT_DIR)/mailcore2/Externals/ctemplate-ios/lib
$(PROJECT_DIR)/mailcore2/build-mac/build/Debug-iphonesimulator
And the Header Search Path to
$(PROJECT_DIR)/mailcore2/build-mac/build/Debug-iphonesimulator/include - recursively
But, that did not work for me. I had to add the HARD CODED PATH to each of those 3 folders.
After doing a clean and build I was then able to add the
#import <MailCore/MailCore.h>
Now it BUILDs completely without error for me.
I will go back and try to add proper relative paths to each of those Search Paths.
Hopefully this helps somebody else with same issue.
FWIW
Had same problem, spend hours trying - nothing worked, not ever hardcoding paths.
Then I stumbled on one issue:
if in XCode\Preferences\Locations I go to Derived Data - Advanced and set it to different locations it always reverts it to Unique, when I go back and check it.
Then I went in File\Project Setting to Derived Data - Advanced and there it was set to Unique. I changed it there to Default and now it does not have that issue anymore!
I delete Derived data, clean project and Start build (Ctrl+B) and I can see now how Build is being created in derived data w/o problems. And that what mailcore needs to function.
And, I checked - no need for hardcoded paths either!
Hope it helps somebody.
PS Another feature maybe useful too - XCode\Preferences\Continue building after error though it did not matter in my case

Xcode: "The document could not be saved. You don’t have permission."

I'm getting this error when trying to save a file in Xcode 4:
"The document could not be saved. You don’t have permission. To view or change permissions, select the item in the Finder and choose File > Get Info."
Naturally, saving the file in TextMate works fine. Permissions: -rw-r--r--
Nothing changed from when it worked the last time.
Files are not locked, I tried rebooting, disk space is ok, files are on a local drive, error was googled. Any ideas?
Thanks.
Update: Also tried copying the files or renaming them. Directories are not locked. By the way, when I edited project configuration in Xcode it saves fine, I only met with the issue saving .m/.h files. I guess that copying the actual text in the files would work but I'm trying to find a bit less hardcore solution (bash script wouldn't be the issue but there could be other problems). It's not the simplest project either (~70 files, edited config).
Update 2: Found possible duplicate, doesn't really resolve the problem Unable to unlock file for editing in Xcode 4?
Update 3: Checked out earlier commit and when opening Xcode it said the project is locked. Checked out the same commit again and the error does not appear again (all files exc. DS_Store are tracked). What.
Update 4: I created a new user and set chmod -R 777 to the project directory. Editing now works fine. However I can't get it to work under my main account (I have all my preferences here.)
Rebooting fixed the error in my case.
Fixed by changing account name by following this guide. This essentialy creates a new account but with your old Home directory and within the process of transferring it fixes some file permissions.
(From above link:)
For Mac OS X v10.5 or later (do this twice if you want to keep your original username)
:
Enable the root user.
Log in as root.
Navigate to the /Users folder.
Select the Home folder with the short name you want to change, and rename it just like you would rename any folder. Keep in mind that the shortname must be all lowercase, with no spaces, and only contain letters.
Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents.
Choose Log Out from the Apple menu.
Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
Disable the root user.
Xcode 6 update: still seeing this problem.
Seems like an Xcode bug, because opening the file by clicking the error in the Issue navigator causes this problem, but if I open the file using the cmd+shift+O shortcut I am able to edit and save it. So for me the workaround is to not open the file by selecting the error and to open it using the Project navigator or Open quickly shortcut.
I upgraded to Lion and downloaded the new Xcode and found the same problem and found nothing to help, losing about three days trying to fix it. Then I realized that the Xcode 4, which is saved in the Applications folder, doesn't overwrite Xcode 3, which is in the Developer folder. When I was opening Xcode, I was opening version 3, not 4.
Make sure you're opening the right version.
open up the terminal and set
chmod 777
to the desired file or set
chmod -R 777
to the desired directory.
it should solve your problem
I just ran into this issue also. I was not able to fix it not by changing the permissions of the individual project file or folder. However, I was able to fix it by going into 'get info' on my user's home folder, reselecting the 'Read & Write' permissions for my user, and then clicking the gear->'apply to enclosed items'. Took it a while but then everything worked as expected. Hope it helps someone else.
This maybe helpful If you use CocoaPods: https://stackoverflow.com/a/38885499/3395008
I'm running Xcode 7.3 and CocoaPods 1.0.0. and this happens when trying to modify a file from a pod added as a development pod (i.e. from a local directory).
I just pod update again, when pod finished, Xcode will show an alert "The document has previously unsaved changes.", then click "Re-Save". that fix my issue.
I Had the same problem with actual swiftUI.
Solved the Problem easy:
Copy and paste the content from .swift-file to a word-document
Delete the swift-file
Close Xcode and reboot Hardware
New .swift-file in XCode and paste code from word-document
cmd+B ... cmd+r
I used to encounter the same problem several times, last time it was on Xcode 12.4
It seems like a bug for me, because it tells that some private file is modified despite I don't have any permissions to do so even if I want. Force quitting and relaunching the Xcode always helped before.