Skip to content

Commit

Permalink
fix(mps-sync-plugin): replace intendedFinalization annotation field w…
Browse files Browse the repository at this point in the history
…ith a generic message
  • Loading branch information
benedekh committed May 14, 2024
1 parent c398449 commit 0b8792e
Show file tree
Hide file tree
Showing 63 changed files with 113 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.io.IOException
import java.net.URL
import java.util.concurrent.CompletableFuture

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
interface ISyncService : AutoCloseable {

@Throws(IOException::class)
Expand All @@ -34,7 +34,7 @@ interface ISyncService : AutoCloseable {
fun setActiveProject(project: Project)
}

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
interface IBinding {

fun activate(callback: Runnable? = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import org.modelix.mps.sync.transformation.mpsToModelix.initial.ModuleSynchroniz
import java.io.IOException
import java.net.URL

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class SyncServiceImpl(userNotifier: INotifier) : ISyncService {

private val logger = KotlinLogging.logger {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.modelix.mps.sync.bindings
import org.modelix.kotlin.utils.UnstableModelixFeature
import org.modelix.mps.sync.IBinding

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class BindingSortComparator : Comparator<IBinding> {
/**
* ModelBindings should come first, then ModuleBindings. If both bindings have the same type, then they are sorted lexicographically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.modelix.mps.sync.util.synchronizedLinkedHashSet
import org.modelix.mps.sync.util.synchronizedMap
import java.util.concurrent.LinkedBlockingQueue

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
object BindingsRegistry {

private val modelBindingsByModule = synchronizedMap<SModule, MutableSet<ModelBinding>>()
Expand Down Expand Up @@ -88,13 +88,13 @@ object BindingsRegistry {
changedBindings.put(BindingState(binding, BindingLifecycleState.REMOVE))
}

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
data class BindingState(
val binding: IBinding,
val state: BindingLifecycleState,
)

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
enum class BindingLifecycleState {
ADD,
REMOVE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.modelix.mps.sync.IBinding
import org.modelix.mps.sync.util.completeWithDefault
import java.util.concurrent.CompletableFuture

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class EmptyBinding : IBinding {
override fun activate(callback: Runnable?) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.modelix.mps.sync.transformation.mpsToModelix.incremental.NodeChangeLi
import org.modelix.mps.sync.util.completeWithDefault
import java.util.concurrent.CompletableFuture

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class ModelBinding(val model: SModelBase, branch: IBranch) : IBinding {

private val logger = KotlinLogging.logger {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import org.modelix.mps.sync.util.completeWithDefault
import org.modelix.mps.sync.util.waitForCompletionOfEach
import java.util.concurrent.CompletableFuture

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class ModuleBinding(val module: AbstractModule, branch: IBranch) : IBinding {

private val logger = KotlinLogging.logger {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import org.modelix.model.lazy.BranchReference
import org.modelix.model.mpsadapters.MPSLanguageRepository
import org.modelix.mps.sync.mps.RepositoryChangeListener

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
object BranchRegistry : AutoCloseable {

var branch: IBranch? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@ import org.modelix.kotlin.utils.UnstableModelixFeature
* Module C to the server. So in this case Module A just creates this token to let the sync flow know that Module C
* does not have to be synced again.
*/
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
abstract class ItemAlreadySynchronized(val item: Any)

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class ModelAlreadySynchronized(val model: SModel) : ItemAlreadySynchronized(model)

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class ModuleAlreadySynchronized(val module: SModule) : ItemAlreadySynchronized(module)

/**
* An exception to show that the referred item is already synchronized to Modelix.
*/
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
abstract class ItemAlreadySynchronizedException(val item: Any, message: String) : Exception(message)

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class ModelAlreadySynchronizedException(val model: SModel) : ItemAlreadySynchronizedException(
model,
"Model '${model.name}' in Module '${model.module?.moduleName}' already exists on the server, therefore it and its parent module will not be synchronized completely. Remove the parent module from the project and synchronize it from the server instead.",
)

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class ModuleAlreadySynchronizedException(val module: SModule) : ItemAlreadySynchronizedException(
module,
"Module '${module.moduleName}' already exists on the server, therefore it will not be synchronized. Remove it from the project and synchronize it from the server instead.",
)

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class NodeAlreadySynchronizedException(val node: SNode) : ItemAlreadySynchronizedException(
node,
"Node '${node.name}' already exists on server, therefore it will not be synched. Remove its parent node or its parent model and synchronize the parent model from the server instead.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.modelix.model.client2.ReplicatedModel
import org.modelix.model.mpsadapters.MPSLanguageRepository
import org.modelix.mps.sync.transformation.modelixToMps.incremental.ModelixTreeChangeVisitor

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class ModelixBranchListener(
replicatedModel: ReplicatedModel,
languageRepository: MPSLanguageRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import jetbrains.mps.ide.project.ProjectHelper
import jetbrains.mps.project.MPSProject
import org.modelix.kotlin.utils.UnstableModelixFeature

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
object ActiveMpsProjectInjector {

// TODO what shall happen if we switch MPSProjects? Some threads might still be working on the old MPSProject. (with other words: search for all places where this field is referred to and think about if it can cause trouble if we change this reference to another one suddenly..)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package org.modelix.mps.sync.mps

import org.modelix.kotlin.utils.UnstableModelixFeature

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
object ApplicationLifecycleTracker {
var applicationClosing = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import java.io.IOException
* Uses the provided model ID instead of SModelId.generate().
* Everything else is just copied from DefaultModelPersistence.
*/
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
open class ModelPersistenceWithFixedId(val moduleRef: SModuleReference, val modelId: SModelId) :
DefaultModelPersistence() {

Expand All @@ -69,7 +69,7 @@ open class ModelPersistenceWithFixedId(val moduleRef: SModuleReference, val mode
}
}

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
open class ModelPersistenceFacility(modelFactory: DefaultModelPersistence, dataSource: StreamDataSource) :
LazyLoadFacility(modelFactory, dataSource, true) {
protected val source0: StreamDataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.modelix.model.api.ITree
import org.modelix.mps.sync.bindings.BindingsRegistry
import org.modelix.mps.sync.transformation.mpsToModelix.initial.NodeSynchronizer

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class RepositoryChangeListener(branch: IBranch) : SRepositoryListenerBase() {

private val bindingsRegistry = BindingsRegistry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import org.modelix.mps.sync.transformation.cache.MpsToModelixMap
import org.modelix.mps.sync.util.nodeIdAsLong
import org.modelix.mps.sync.util.waitForCompletionOfEachTask

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class SNodeFactory(
private val conceptRepository: MPSLanguageRepository,
private val nodeMap: MpsToModelixMap,
Expand Down Expand Up @@ -157,7 +157,7 @@ class SNodeFactory(
fun clearResolvableReferences() = resolvableReferences.clear()
}

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
data class ResolvableReference(
val source: SNode,
val reference: SReferenceLink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import org.modelix.mps.sync.mps.ActiveMpsProjectInjector
import java.io.File

// TODO hacky solution. A nicer one could be: https://github.com/JetBrains/MPS/blob/master/workbench/mps-platform/jetbrains.mps.ide.platform/source_gen/jetbrains/mps/project/modules/SolutionProducer.java
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class SolutionProducer {

private val project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.modelix.kotlin.utils.UnstableModelixFeature
import java.awt.Color
import javax.swing.JComponent

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class AlertNotifier(private val project: Project, private val title: String = "Modelix Sync Plugin") : INotifier {

override fun error(message: String, responseListener: UserResponseListener?) {
Expand All @@ -34,7 +34,7 @@ class AlertNotifier(private val project: Project, private val title: String = "M
}
}

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
private abstract class ModelixDialog(project: Project, title: String, message: String, color: Color) :
DialogWrapper(project) {

Expand All @@ -52,14 +52,14 @@ private abstract class ModelixDialog(project: Project, title: String, message: S
override fun createCenterPanel(): JComponent? = null
}

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
private class ModelixErrorDialog(project: Project, title: String, message: String) :
ModelixDialog(project, title, message, MessageType.ERROR.titleForeground)

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
private class ModelixWarningDialog(project: Project, title: String, message: String) :
ModelixDialog(project, title, message, MessageType.WARNING.titleForeground)

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
private class ModelixInfoDialog(project: Project, title: String, message: String) :
ModelixDialog(project, title, message, MessageType.INFO.titleForeground)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.intellij.openapi.project.Project
import org.modelix.kotlin.utils.UnstableModelixFeature
import javax.swing.event.HyperlinkEvent

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
class BalloonNotifier(
private val project: Project,
private val title: String = "Modelix Sync Plugin",
Expand Down Expand Up @@ -38,7 +38,7 @@ class BalloonNotifier(
}
}

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
private class UrlListenerToUserResponseAdapter(
private val userResponseListener: UserResponseListener?,
) : NotificationListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.modelix.mps.sync.mps.notifications

import org.modelix.kotlin.utils.UnstableModelixFeature

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
interface INotifier {

fun error(message: String, responseListener: UserResponseListener? = null)
Expand All @@ -12,7 +12,7 @@ interface INotifier {
fun info(message: String, responseListener: UserResponseListener? = null)
}

@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "2024.1")
@UnstableModelixFeature(reason = "The new modelix MPS plugin is under construction", intendedFinalization = "This feature is finalized when the new sync plugin is ready for release.")
fun interface UserResponseListener {

fun userResponded(response: UserResponse)
Expand Down
Loading

0 comments on commit 0b8792e

Please sign in to comment.