C# - Visual Studio Package - Place a button on the Resolve Conflict window - conflict

I am developing a Visual Studio Pacakge. I would like to place my button on the Resolve Conflict window next to the "Keep Local Version" button. It would be also good if i could place my button on this window somehow somewhere.
Resolve Conflict window
I found this source file that contains a lot of IDs (GUIDs).
vsshlids.h
I tried all of the IDs from the Team Foundation section.
// Team Foundation Client standard menu
#define IDM_MENU_TEAM_FOUNDATION_CLIENT 0x700
#define IDM_MENU_PROJECT_CONTEXT_MENU 0x707
#define IDM_TEAM_PROJECT_SETTINGS_MENU 0x708
#define IDM_TEAM_SERVER_SETTINGS_MENU 0x709
// Team Foundation Client Toolbar Group
#define IDG_TEAM_FOUNDATION_CLIENT_TOOLBAR 0x701
// Commands on the Team menu for projects that require project context
#define IDG_MENU_PROJECT_CONTEXT 0x702
// Commands on the Team menu shared by tools (e.g. Properties)
#define IDG_SHARED_COMMANDS 0x703
// Tool-specific commands on the Team menu
#define IDG_TOOL_COMMANDS 0x704
// Team Project Settings Cascade Menu Group
#define IDG_TEAM_PROJECT_SETTINGS_COMMANDS 0x705
// Team Server Settings Cascade Menu Group
#define IDG_TEAM_SERVER_SETTINGS_COMMANDS 0x706
// Commands on the TE context menu for projects that require project context
#define IDG_CTXT_PROJECT_CONTEXT 0x710
but the first four places my button in the Team group in the menu bar and the others do nothing. It is my fault: i didn't find them or i implented them wrongly.
Is it possible to place my button on the Resolve Conflict windows somehow?
Thank you for your help in advance,
Balazs

Related

IntelliJ 2019 scroll to source missing from project options menu

My question consist of 2 parts:
After update to 2019 version of IntelliJ Scroll to Source option from project panel is missing, after some web search I'm unable to find it. Is it missing? Default?
I'd like to set "scroll to source" so that whenever I'm opening tab it's highlighted in project, but exclude redirect to external libraries like java's or node_modules (they tend to be several classes long and make scrolling time-consuming). Excluding those libraries from project would be kind of a way perhaps?
The actions have been renamed improve an user experience for those who move from other IDEs: Autoscroll to Source -> Open Files with Single Click, Autoscroll from Source -> Always Select Opened File; see IDEA-217044.
Note that Scroll from Source button (currently called Select Opened File) is only available if Always Select Opened FIle is disabled.
There is no way to disable auto-scrolling to libraries; please vote for IDEA-200580 to be notified on any progress with this feature request.

#if DEBUG isn't work on some device for TestFlight version

The below code is work for direct running, but some weird situation occur on TestFlight version. I use Debug build configuration for my archive.
There is a button show on DEBUG mode that is work properly. Tap the button is going to show a table that contains a row and tap the row will perform some action on DEBUG mode. but some weird thing happened the button is show but the row do nothing after tapping. There is a more weird thing. I have a device is work totally fine but other don't.
I have tried to add -DDEBUG on other swift flag but not work.
Any idea welcome.
#if DEBUG
// swift code ...
#endif
#ifdef DEBUG
// objc code ...
#endif
If you want to branch out from your existing project, you need to set up a separate project target.

Multiple release configurations in Xcode

I'm trying to build two separate applications for release. One of them should have less features than the other. I would disable those features with macros. Something in the lines of:
#ifdef DEMO_VERSION
// less code
#else
// more code
#endif
The question is, how do i define the DEMO_VERSION (which i would usually just put under "other preprocessor macros") so that i could easily switch it on and off? I could just define it manually every time i need to compile the app and delete it when compiling the actual release version, but i suspect there could be a smarter way of achieving this.
You can manage build configurations from the project info view in Xcode. Here, you can duplicate the default "Release" configuration, and then adjust the build settings to define a specific preprocessor macro for each configuration:
Select your project from the project navigator pane on the left. In the projects/targets list that is shown, ensure you have the project selected.
Choose the Info tab. Under Configurations, click + > Duplicate "Release" Configuration and rename it something like "Release (Demo)".
Choose the Build Settings tab. Expand the Preprocessor Macros entry to show the per-configuration settings. Add DEMO_VERSION=1 for the "Release (Demo)" configuration only.
Now, at compile time, your preprocessor statements will conditionally compile based on your current build configuration.

How do I add .m files to Xcode without conflicts

I'm currently learning Objective-C and working my way through a book which contains lots of exercises. At the beginning of the book I set up an OS X project command line project and have been working in the main.m file, block commenting prior exercises, but it's becoming tiresome working in such a long file, constantly commenting and un-commenting the exercise code I want to build. I'd like to create separate files in the Navigator for each exercise so they are easy to find. How would I go about doing this without causing issues with the file in the Products folder?
I'm currently getting this red alert when I try to build after adding a new .m file:
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This might not be a direct answer to the question (multiple files...) and a somewhat unorthodox approach to it, but it is a fun and convenient way to achieve what you describe by utilizing unit testing.
I understand that you are just starting to learn the language and the tools so I will make it as easy as possible. Let's get started!
1. Add a test target to your project
You just select the project in the navigator, and press the + button under 'targets' to add a new one.
select OS X > Other > Cocoa Testing Bundle and click 'Next'
add a product name (something like 'Exercises' would make sense in your case) and click 'Finish'
Now you should be able to see your new target in the list
2. Configuring the test target
Click and hold on the 'Run' button, select 'Test' from the popup menu
Now Xcode will ask you if you'd like to configure the project for testing. Click 'Edit Scheme...'
Select 'Test' from the left and click on the + button
select the test target we have created in previous step and click 'Close'
3. The Fun part
Now if you click on the 'Test Navigator' you'll see a list of your tests (your 'exercises'). Adding a test is as simple as adding a method starting with test - for example -(void)test_Exercise_x.
Furthermore you will now be able to verify that your answer to each exercise is what should be by using assertions and selectively run a test (exercise) on its own by clicking on the icon in the left of each test (the circled one in the screenshot) or of course, all of them by clicking on the 'Test' button or selecting Product > Test from the menu
Objective-C, C and C++ programs must include precisely one definition of main().
I expect it would work for you do something like:
int main( int argc, char *argv[] )
{
printf( "Solution to exercise #%d\n", getExerciseNumber() );
mySolution();
return 0;
}
you could reuse this file in each of the Xcode projects for your exercises. Alternatively you could have just one project that contained multiple targets, one for each exercise.
Does that help? I'm not completely clear that I understand your question.
Adding multiple files to my Xcode project looks like it's beyond my current abilities. I'll try and attempt to break the project down at a later date, when I'm more confident with Objective-C and Xcode. Thanks for your comments and help.

How to embed ParseKit as a private framework in a Mac App bundle

I need to install ParseKit to compile with cocoa under Mac Os X, I use xcode 4.
I have searched online but there is only a guide for installing parse kit for iPhone.
Where do I find the download for Mac Os X and/or a guide?
Developer of ParseKit here.
OK, after working through a tricky issue in Xcode 4, I have figured out my preferred way to do this: Create a new Workspace ("MySuite") which contains two sub-Projects
Your Mac Cocoa Application Project ("MyApp")
The ParseKit Framework Project ("ParseKit")
You can choose different names than "MyApp" and "MySuite" of course.
There's a few different ways to make this happen. Here's one way:
First, make sure you update to the very latest version of the ParseKit from the Google Code trunk. I have recently modernized the Xcode project for Xcode 4.3.1.
svn checkout http://parsekit.googlecode.com/svn/trunk/ parsekit-trunk
Make sure you do not have the ParseKit Xcode Project window open. This is an issue in Xcode up to version 4.3.1 (and maybe later, not sure).
Create a Mac "Cocoa Application" Project named "MyApp". File > New > Project…. (You may have already created your app. That's fine. Then skip this step.)
Drag the ParseKit.xcodeproj file from the Finder to the very top of the Project Navigator in the "MyApp" Xcode Project window. NOTE: make sure you drop the file at the very top of the Project Navigator tree. Otherwise it will not work.
Xcode will present a dialog: "Do you want to save this project in a new workspace?" Click "Save" and name the Workspace something like "MySuite".
Select the "MyApp" Project in the Project Navigtor.
Select the "MyApp" Target in the "Targets" list.
Select the "Build Phases" tab.
Click the disclosure triangle next to "Target Dependencies" to open the list.
Click the "+" button at the bottom of the list.
Select "ParseKit.framework" from the resulting dialog and click "Add" to add ParseKit as a dependency of your target. This ensures ParseKit is built before your target.
Click the disclosure triangle next to "Link Binary With Libraries" to open the list.
Click the "+" button at the bottom of the list.
Select "ParseKit.framework" from the resulting dialog and click "Add".
Click the disclosure triangle next to "Link Binary With Libraries" to open the list.
Click the "+" button at the bottom of the list.
Select "ParseKit.framework" from the resulting dialog and click "Add".
See "ParseKit.framework" in the "Link Binary With Libraries" list.
Click the "Add Build Phase" Button, choose "Copy Files" in the popup.
In the new "Copy Files" build phase, select "Frameworks" in the "Destination" popup.
Drag "ParseKit.framework" from the Project Navigator to the list in the new "Copy Files" build phase.
In MyAppDelegate.m, import the ParseKit header:
#import <ParseKit/ParseKit.h>
In -[MyAppDelegate applicationDidFinishLaunching:] do:NSString *g = #"#start = Word+;";
PKParser *p = [[PKParserFactory factory] parserFromGrammar:g assembler:self error:nil];
NSError *err = nil;
id result = [p parse:#"foo bar baz" error:&err];
NSLog(#"%#", result);
Build and run.
For more info on this topic, see:
Apple's docs
Chapter 16 of Mastering Xcode 4 by Joshua Nozzi
Open your project in Xcode 4
Make sure Project Navigator is shown
Ctrl click on your project file (the blue page icon)
Select Add Files to "YourProjectName"
Select ParseKit.xcodeproj
In Project Navigator select your project file
Go to Build Phases
Disclose Link Binary With Libraries and either add ParseKit.framework by clicking + or drag'n'drop it from Project Navigator's Products directory of ParseKit.framework
Add Copy File phase by clicking bottom right Add Build Phase button.
Set destination to frameworks
Repeat 8, but for new build phase
You may also need to add Target Dependency: repeat step 8, but for this phase. But looks like Xcode can sort out them itself.
I also recommend you to create a Workspace, it makes managing of subproject much easier and looks like this fixes most part of potential problems, because if Xcode fails to resolve dependencies, you can always add script to copy files manually, since products of projects will share the same build directory.
I managed to do this using cocoapods. Try that if your stuck still
Developer of ParseKit here.
I'm sorry I don't have a good answer for you. I have some outdated docs on how to use ParseKit in your iOS application using Xcode 3.
However, I've just tried to go through the process of embedding ParseKit.framework within a Mac OS X app using Xcode 4, and I honestly could not figure out how to do it in Xcode 4. I am baffled.
What I can say, is that embedding ParseKit.framework in your Mac app should not be very different from embedding any other framework in your Mac app. There's nothing particularly special or unusual about ParseKit in this regard. The problem is I just can't figure out how to do that at all in Xcode 4.
Here's Apple's documentation on how to do this:
Embedding a Private Framework in Your Application Bundle > Using Separate Xcode Projects For Each Target
Unfortunately, Apple's docs are also out of date, and also describe the process in Xcode 3.
I have asked a question here on Stack Overflow to try to solve this problem.