How to hide generated dart files in Android Studio - android-studio

Is it possible to hide generated dart files in Android Studio especially *.g.dart files?

In Project panel, under Options there is a File Nesting Option. I added .chopper.dart; .freezed.dart; .g.dart to .dart parent. This will group related files under the main file.

In Settings panel, open Editor section, and select File Types. Now look for Ignore files and folders field at the bottom. Just include *.g.dart there and you're good to go!

Related

how to include excluded folder in android studio [duplicate]

It's explained how to exclude a directory in Android Studio here. It also has a warning about not knowing how to include it back again. Now I need to do so.
Of-course I can create/import the project again. But I guess there's a better way of doing that. Is there? How?
As there is no "Mark directory as" menu in Android Studio, I found out that such settings like including and excluding directories are stored in a ".iml" file. Named like "project-name.iml".
A line like bellow is used to exclude a dir:
<excludeFolder url="file://$MODULE_DIR$/src/main/blah/blah/blah/" />
So, Re-including is done as easily as removing the line.
if you right click an excluded directory in the Project View, you can select from the context menu:
Mark directory as → Cancel exclusion
You must delete .iml file then try to sync and it will work fine

I want to compare two projects in Android studio

I have a couple Android Studio projects that are similar, and I want to know exactly where their source files differ. What is an easy way to do that?
Right click file/directory/project/module > click compare with > give the path to compare
EASY WAY TO FIND PATH : ( considering both projects are open in Android Studio)
Switch to project you want to compare > right click file/directory/project/module > copy path > paste it back in select path dialog.
BETTER to copy path first.
Verified : Android Studio 1.5.1
In Android studio 3.4.2 you can do by right click on
Select Android : app → Compare Directories select proper path for your files and done.
In Android Studio Bumblebee : app → Compare With or Ctrl+D :)
I'm highly recommend Compare Directories Plugin for Android Studio 2+.
Allows the fast comparison of two directories or archive files (jar,
zip, war... and also tar/gz) based on file contents. Compared
directories/archives are shown in a tree view to give a better and
easier-to-read overall view of the differences.
Installation:
Open: File > Settings > Plugins
Click on the button “Browse repositories”, find the “Compare Directories” plugin in the available plugins list, right click on it and choose install.
General usage instructions:
Execute the Compare Directories... menu command, select two directories or zip/jar/tar files containing files with the same file names and see the comparison results on the opened Compare Directories panel:
Files and directories are shown depending on the differences in their
contents: identical, different by blanks only, non-significantly
different, different, left-only, right-only.
Compared text file can be then edited within IDEA.
Compared text file differences can be then viewed with the usual IDEA diff window.
Compared class bytecode differences can be also viewed with the usual IDEA diff window.
Files and directories can be copied from one side to the other.
You will find many more details in the plugin page:
https://plugins.jetbrains.com/plugin/113-compare-directories

No VC/inc folder in my MSVS 2013 directory

I'm trying to add FLTK to MSVS 2013 and I'm copying the .lib files into vc/inc but I cannot find the folder anywhere. Under the Visual Studio 2013 folder all I have is
ArchitectureExplorer, Backup Files, Code Snippets,
Projects, Settings, StartPages, Templates, Visualizers
What am I missing here? I'm sure its something stupid.
Not exactly sure what you mean by holder. Start VS, select Tools/Options/Projects & Solutions/VC++ directories.
On the right pane, select Include files from the top right box and add your FLTK include directory in the listbox below.
Then select Library files from the top right box and add your FLTK library directory to the listbox below.
That's basically it - there is no need to copy files anywhere.

Add existing xaml files to visual studio 2012

I want to add a folder containing xaml and cs files plus other directories to a different project on VS. For some reason when I drag the folder from windows explorer to the project where I will like to place that directory visual studio will not let me. Because of that I am manually adding each file and every time I encounter a directory I have to create it. Maybe it is because I am using team foundation server.
Anyways I am adding the files manually so I click on the folder that I want to add the files on visual studio then click on add existing files. Then I select the xaml and code behind file:
when I click add the files get added but visual studio does not recognize that Bytes.xaml.cs is the code behind!
Do I have to manually add a window then copy and paste the contents of the file?
Edit your .csproj file to add a "DependentUpon" element below your "Compile" element for the .xaml.cs file so that it will appear "inside" the .xaml file not simply below it.:
<Compile Include="BytesDisplay\SubControls\Bytes.xaml.cs">
<DependentUpon>Bytes.xaml</DependentUpon>
</Compile>
To easily edit the .csproj file:
Right-click the project and select "Unload Project"
Right-click the project node again and select "Edit [projectname].csproj"
Edit the XML, then close the file
Right-click the project node again and select "Reload Project"
If you drag-and-drop the .xaml file from Windows Explorer into the Solution Explorer window, it will automatically add the .xaml with the code-behind .cs file.
thanks for the write-up. If you edit the xaml and .cs files class declaration to match without class collisions - then when you add the .xaml file it will pick up the .xaml.cs automatically if it is on the same folder. (vs 2013)

Visual C++ 2005: Icon saved to file is different to resource in editor

I have this weird problem. I have an icon in my C++ project's resource section, and it tells me it's "res\icon123.ico". I make some changes to this icon and save/rebuild... and while the resource editor shows the new version, the .ico file in Explorer has not changed.
How is VS storing my changes and why won't it let me do what I want?
Individual .ico files can contain multiple copies of the icon, in different resolutions and color depths. You are probably editing one, while Explorer is showing a different one. Look for the resolution selection dropdown in Visual Studio to change which resolution you're editing.
I've had the same problem, and it has nothing to do with different icon formats in the file - you can entirely replace the .ico file and you'll still have this problem. My solution was to completely remove all the extra files built by Visual Studio like the .aps and .suo files. I'm not exactly sure which one caches the icon.

Resources