void RefactoringPlugin::init(PluginConfigurator const &configurator) { mErrorReporter = configurator.mainWindowInterpretersInterface().errorReporter(); mLogicalModelApi = &configurator.logicalModelApi(); mGraphicalModelApi = &configurator.graphicalModelApi(); mMetamodelGeneratorSupport = new MetamodelGeneratorSupport( configurator.mainWindowInterpretersInterface().errorReporter() , &configurator.mainWindowInterpretersInterface()); mRepoControlIFace = &configurator.repoControlInterface(); mMainWindowIFace = &configurator.mainWindowInterpretersInterface(); mQRealSourceFilesPath = SettingsManager::value("qrealSourcesLocation", "").toString(); mQRealSourceFilesPath = SettingsManager::value("qrealSourcesLocation").toString(); mPathToRefactoringExamples = mQRealSourceFilesPath + "/plugins/refactoring/refactoringExamples/"; mRefactoringWindow = new RefactoringWindow(mMainWindowIFace->windowWidget()); connect(mRefactoringWindow, SIGNAL(rejected()), this, SLOT(discardRefactoring())); mRefactoringRepoApi = new qrRepo::RepoApi(mQRealSourceFilesPath + "/plugins/refactoring/refactoringExamples", true); mRefactoringFinder = new RefactoringFinder(configurator.logicalModelApi() , configurator.graphicalModelApi() , configurator.mainWindowInterpretersInterface() , mRefactoringRepoApi); connect(mRefactoringWindow, SIGNAL(findButtonClicked(QString)), this, SLOT(findRefactoring(QString))); connect(mRefactoringWindow, SIGNAL(findNextButtonClicked()), this, SLOT(findNextRefactoring())); connect(mRefactoringWindow, SIGNAL(discardButtonClicked()), this, SLOT(discardRefactoring())); connect(mRefactoringWindow, SIGNAL(applyButtonClicked()), this, SLOT(applyRefactoring())); mRefactoringApplier = new RefactoringApplier(configurator.logicalModelApi() , configurator.graphicalModelApi() , configurator.mainWindowInterpretersInterface() , mRefactoringRepoApi , &mCurrentMatch); }
void RobotsPlugin::init(PluginConfigurator const &configurator) { details::Tracer::debug(details::tracer::initialization, "RobotsPlugin::init", "Initializing plugin"); mInterpreter.init(configurator.graphicalModelApi() , configurator.logicalModelApi() , configurator.mainWindowInterpretersInterface()); mMainWindowInterpretersInterface = &configurator.mainWindowInterpretersInterface(); details::Tracer::debug(details::tracer::initialization, "RobotsPlugin::init", "Initializing done"); }
void VisualInterpreterPlugin::init(PluginConfigurator const &configurator) { mErrorReporter = configurator.mainWindowInterpretersInterface().errorReporter(); mMetamodelGeneratorSupport = new MetamodelGeneratorSupport( configurator.mainWindowInterpretersInterface().errorReporter() , &configurator.mainWindowInterpretersInterface()); mVisualInterpreterUnit = new VisualInterpreterUnit(configurator.logicalModelApi() , configurator.graphicalModelApi() , configurator.mainWindowInterpretersInterface()); }
void VisualDebuggerPlugin::init(PluginConfigurator const &configurator) { mErrorReporter = configurator.mainWindowInterpretersInterface().errorReporter(); mParser = new BlockParser(mErrorReporter); mVisualDebugger = new VisualDebugger(configurator.logicalModelApi() , configurator.graphicalModelApi() , configurator.mainWindowInterpretersInterface() , mParser ); mDebuggerConnector = new DebuggerConnector(this); }
void RobotsPlugin::init(PluginConfigurator const &configurator) { details::Tracer::debug(details::tracer::initialization, "RobotsPlugin::init", "Initializing plugin"); mInterpreter.init(configurator.graphicalModelApi() , configurator.logicalModelApi() , configurator.mainWindowInterpretersInterface() , configurator.projectManager()); mMainWindowInterpretersInterface = &configurator.mainWindowInterpretersInterface(); mSceneCustomizer = &configurator.sceneCustomizer(); SettingsManager::setValue("IndexGrid", gridWidth); mCustomizer.placePluginWindows(mInterpreter.watchWindow(), produceSensorsConfigurer()); rereadSettings(); connect(mRobotSettingsPage, SIGNAL(saved()), this, SLOT(rereadSettings())); details::Tracer::debug(details::tracer::initialization, "RobotsPlugin::init", "Initializing done"); }
void VisualDebuggerPlugin::init(PluginConfigurator const &configurator) { mErrorReporter = configurator.mainWindowInterpretersInterface().errorReporter(); mParser = new BlockParser(mErrorReporter); mVisualDebugger = new VisualDebugger(configurator.logicalModelApi() , configurator.graphicalModelApi() , configurator.mainWindowInterpretersInterface() , mParser ); mDebuggerConnector = new DebuggerConnector(this); connect(&configurator.systemEvents(), SIGNAL(activeTabChanged(Id)), this, SLOT(activeTabChanged(qReal::Id))); }
void RobotsPluginFacade::initFactoriesFor(QString const &kitId , interpreterBase::robotModel::RobotModelInterface const *model , PluginConfigurator const &configurer) { // Pulling each robot model to each kit plugin with same ids. We need it for supporting // plugin-based blocks set extension for concrete roobt model. for (interpreterBase::KitPluginInterface * const kit : mKitPluginManager.kitsById(kitId)) { interpreterBase::blocksBase::BlocksFactoryInterface * const factory = kit->blocksFactoryFor(model); if (factory) { /// @todo Non-obvious dependency on mParser, which may or may not be constructed here. /// More functional style will be helpful here. factory->configure(configurer.graphicalModelApi() , configurer.logicalModelApi() , mRobotModelManager , *configurer.mainWindowInterpretersInterface().errorReporter() , *mParser ); mBlocksFactoryManager.addFactory(factory, model); } } }